-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] AsyncVectorEnv getting hung up as pip.recv()
not returning anything for _check_observation_spaces
#3273
Comments
Gym 0.15 is 5 years old, I suspect that no one will be able to help without the project being updated to a more recent version Are you able to use a sync vector env? |
Hey, thanks for the response. I realize the gym version I'm using is outdated and that I might just have to bite the bullet and update the project going forward. But yeah, everything else seems to work fine. I can use |
Async will speed things up but generally not by that much, maybe 10/20% would be my guess |
Hi I'm also having same behavior when using AsyncVectorEnv. It's just hanging. Version 0.29.1 I'm creating envs this way: cubic_envs = AsyncVectorEnv([lambda: PhysicsWrapper(
ExportingWrapper(gym.make('GraphCubicEnv-v0', env_idx=i, exporter_ctor=lambda: ZmqExporter(args['exporter_addr']), reward_fn = reward_h, done_fn = done_h, **args)),
lambda: ZmqPhysicsClient(args['phys_addr']),
reward_phs,
**args
) for i in range(0,5)]
) UPD: In the OP case I guess the problem is in the invocation of |
I'm having an issue initializing an AsyncVectorEnv for a custom environment which uses pybullet. I should specify that I am using
gym==0.15.3
as this is the only compatible one for the environment I'm using.I am using the following
make_env
function:And
envs = AsyncVectorEnv([make_env(env_id, i, False, seed) for i in range(num_envs)])
I've added some print statements to narrow down where the code is hanging. It seems to be in the
def _check_observation_spaces(self):
which is in line 307 inasync_vector_env.py
. Specifically after the loop:This does seem to send the message but I do not receive anything when
same_spaces, successes = zip(*[pipe.recv() for pipe in self.parent_pipes])
is called.The code works fine when testing with cartpole, so it might be something to do with my environment and pybullet. Nonetheless wanted to post this here incase anyone is able to help. Thank you!
The text was updated successfully, but these errors were encountered: