Skip to content

[envpool] auto-register minigrid environments - #345

Merged
Trinkle23897 merged 2 commits into
mainfrom
jiayi/fix-minigrid-registration
Mar 23, 2026
Merged

[envpool] auto-register minigrid environments#345
Trinkle23897 merged 2 commits into
mainfrom
jiayi/fix-minigrid-registration

Conversation

@Trinkle23897

Copy link
Copy Markdown
Collaborator

Summary

  • Problem: the top-level envpool import path never loaded envpool.minigrid.registration, so MiniGrid envs were documented and individually registered but absent from envpool.list_all_envs() and failed in envpool.make(...).
  • Scope: wire MiniGrid into the top-level registration and build targets, and add a focused regression test for the normal make path.
  • Outcome: MiniGrid envs are available from a standard import envpool again, and make_gymnasium("MiniGrid-Empty-5x5-v0") succeeds.

This fixes #311.

Technical Details

  • Approach: import envpool.minigrid.registration from envpool.entry, then mirror that dependency in Bazel so the top-level envpool target keeps the registration module and extension available.
  • Code pointers:
    • envpool/entry.py: adds MiniGrid to automatic registration on import envpool
    • envpool/BUILD: adds MiniGrid registration/runtime deps to the top-level target
    • envpool/make_test.py: adds targeted regression coverage for MiniGrid creation
  • Notes: keeps the existing generic test_list_all_envs unchanged 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_test ran _MakeTest.test_list_all_envs and _MakeTest.test_make_minigrid successfully on Linux/Python 3.12

Suggested 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 path
  • python -c 'import envpool; envpool.make("MiniGrid-Empty-5x5-v0", env_type="gymnasium", num_envs=2)': verify the original issue reproducer now succeeds

@Trinkle23897
Trinkle23897 merged commit db063c0 into main Mar 23, 2026
2 of 4 checks passed
@Trinkle23897
Trinkle23897 deleted the jiayi/fix-minigrid-registration branch March 23, 2026 20:32
@Trinkle23897 Trinkle23897 linked an issue Mar 24, 2026 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Minigrid is not supported as per documentation [BUG] AssertionError: MiniGrid-Empty-5x5-v0 is not supported

1 participant