Closed edbeeching closed 1 year ago
Base: 76.99% // Head: 77.40% // Increases project coverage by +0.40%
:tada:
Coverage data is based on head (
e8228fb
) compared to base (5f2bccc
). Patch coverage: 84.57% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Thanks for your comments. I have reduced the nesting a bit and reused parts where possible. The override_defaults for the envpool of Atari and Mujoco are slightly different (batched rendering, env_agents). So I will have duplicates of these.
I was thinking to reduce the nesting / name lengths in the other examples, could we make the following changes for (atari, dmlab, mujoco and vizdoom): sf_examples/atari_examples/atari/atari_params.py -> sf_examples/atari_examples/atari_params.py (sample for atari_utils.py) sf_examples/atari_examples -> sf_examples/atari
@edbeeching Hate to bring this up but I think Envpool caught up to Gym 0.26 as well :D See here: https://github.com/sail-sg/envpool/releases/tag/v0.6.5
I think this is the reason why the tests fail. Your wrappers expect 4-tuple step() and just obs returned from reset() but new envpool returns 5-tuple from step() and 2-tuple from reset()
On the bright side, looks like we can delete some of the wrappers and the code will be more simple! :) Can you merge the latest sf2 into this branch and update to envpool 0.6.5?
@edbeeching I added a few changes to fix that Atari-only flag in enjoy.py while keeping the optional "smooth rendering" functionality for other envs like VizDoom. I believe this should not break anything - I checked and both Atari and Doom render fine.
sf_examples/atari_examples/atari/atari_params.py -> sf_examples/atari_examples/atari_params.py (sample for atari_utils.py) sf_examples/atari_examples -> sf_examples/atari
Yes, let's do these things.
The reason I went with <env>_examples
was because of isaacgymenvs having some weird relative imports (naming the module just isaacgym
broke things).
Since this does not apply to any other envs, I think it's safe to just use <env>
for module names.
@edbeeching I made some more changes so that tests actually fail instead of freezing if there's an exception in the environment.
Also removed [dev_envpool] in setup.py because I believe it's redundant.
You can just do pip install -e .[dev,envpool]
which is going to do the same thing. Let me know if I'm missing something.
@alex-petrenko, ah good. One less wrapper to maintain. I've updated everything. Good point about dev_envpool.
I did the example renames as well, apart from isaacgym. I didn't touch doom subdirs, as there are many files in each subdir.
Let me know of any other changes / comments.
Adds envpool integration for Atari and Mujoco.
The integration works as follows, when batched_sampling=True envpool is used, when false it uses the normal method.