[Dependency Upgrade] migrate habitat-lab from gym to gymnasium - #2223
Open
xiaosq2000 wants to merge 1 commit into
Open
[Dependency Upgrade] migrate habitat-lab from gym to gymnasium#2223xiaosq2000 wants to merge 1 commit into
xiaosq2000 wants to merge 1 commit into
Conversation
Gym 0.23 is unmaintained and warns on import with NumPy 2, which makes this dependency noisy in modern environments and blocks a clean upgrade path. Keep Habitat's existing reset/step contracts and registered env IDs in place so this change is reviewable as a backend dependency swap first. That keeps baselines, HITL, and GymRegistryEnv users working while a follow-up can migrate the public API to native Gymnasium semantics.
Author
wadeKeith
reviewed
May 12, 2026
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.
Motivation and Context
Importing Habitat currently pulls in the unmaintained
gymdependency, which emits a warning in modern NumPy environments:python -c 'import habitat'This PR migrates habitat-lab from
gymtogymnasiumso that importing Habitat no longer emits that warning. The change preserves Habitat's current env IDs and reset/step behavior without a broader public API transition to native gymnasium.In short:
gymimports/usages withgymnasiumHow Has This Been Tested
Tested locally with:
SKIP=mypy pre-commit run --all-files --hook-stage=manualTypes of changes
Checklist