You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromray.rllib.agents.ppoimportPPOTrainerfromray.rllib.env.multi_agent_envimportMultiAgentEnvfromgym.spacesimportDiscrete, MultiBinaryimportnumpyasnpclassProblemEnv(MultiAgentEnv):
def__init__(self, config=None):
self.timestep_limit=100self.observation_space=MultiBinary([3, 10, 10])
self.action_space=Discrete(4)
self.reset()
defreset(self):
returnnp.zeros((3, 10, 10))
defstep(self, action: dict):
# I removed this code to make the example as short as possible. raiseNotImplementedErrorenv=ProblemEnv()
ppo_trainer=PPOTrainer(
config={
'env': ProblemEnv,
'create_env_on_driver': True,
'multiagent': {
'policies': {
'policy1': (None, env.observation_space, env.action_space, {}),
'policy2': (None, env.observation_space, env.action_space, {}),
},
'policy_mapping_fn': lambdaagent_id: 'policy1'ifagent_id=='agent1'else'policy2',
},
}
)
results=ppo_trainer.train()
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered:
cool-RR
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Sep 19, 2022
kouroshHakha
added
P1
Issue that should be fixed within a few weeks
and removed
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Oct 26, 2022
What happened + What you expected to happen
The bug
I'm getting this recursion error (truncated because it's very large and repetitive:
Expected behavior
I expected the code to run without error, and to train PPO on my environment.
Versions / Dependencies
Python 3.10.4
Reproduction script
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: