[envpool] auto-register minigrid environments - #345
Merged
Conversation
3 tasks
3 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
envpoolimport path never loadedenvpool.minigrid.registration, so MiniGrid envs were documented and individually registered but absent fromenvpool.list_all_envs()and failed inenvpool.make(...).import envpoolagain, andmake_gymnasium("MiniGrid-Empty-5x5-v0")succeeds.This fixes #311.
Technical Details
envpool.minigrid.registrationfromenvpool.entry, then mirror that dependency in Bazel so the top-levelenvpooltarget keeps the registration module and extension available.envpool/entry.py: adds MiniGrid to automatic registration onimport envpoolenvpool/BUILD: adds MiniGrid registration/runtime deps to the top-level targetenvpool/make_test.py: adds targeted regression coverage for MiniGrid creationtest_list_all_envsunchanged and puts the MiniGrid assertion in its own test.Test Plan
Automated
brix ssh dev-0 -C -- 'chmod +x /tmp/envpool_issue311_fix_verify.sh && bash /tmp/envpool_issue311_fix_verify.sh /tmp/envpool_issue311_fix_repo.tar.gz': passed;//envpool:make_testran_MakeTest.test_list_all_envsand_MakeTest.test_make_minigridsuccessfully on Linux/Python 3.12Suggested Manual
python -c 'import envpool; print("MiniGrid-Empty-5x5-v0" in envpool.list_all_envs())': verify the task is registered from the top-level import pathpython -c 'import envpool; envpool.make("MiniGrid-Empty-5x5-v0", env_type="gymnasium", num_envs=2)': verify the original issue reproducer now succeeds