Skip to content

Switch gym dependency to gymnasium#486

Open
giotherobot wants to merge 6 commits into
google:mainfrom
giotherobot:convert_gymnasium
Open

Switch gym dependency to gymnasium#486
giotherobot wants to merge 6 commits into
google:mainfrom
giotherobot:convert_gymnasium

Conversation

@giotherobot

Copy link
Copy Markdown

Since gym is deprecated in favor of gymnasium (see https://github.com/openai/gym?tab=readme-ov-file#important-notice) here I propose the switch, allowing both installation as alternative to keep backwards compatibilty.

This allows for use of python>=3.10, that is incompatible with gym.

Possible fix for #421.

@lebrice

lebrice commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

Just a note: I think the Gym wrappers here use the gym step format, not the gymnasium step format with terminated and truncated. Perhaps these would also need to be updated, as well as the pytorch training notebook that used those wrappers.

@btaba

btaba commented Jun 7, 2024

Copy link
Copy Markdown
Collaborator

Hi @lebrice can you add gymnasium to the requirements, so that the builds pass? Thank you!

@giotherobot

Copy link
Copy Markdown
Author

The idea was to keep both the gym and gymnasium dependencies and let the user install the preferred one, I guess this needs modification of the CI to install one of the two.

Or if you prefer I can drop the gym dependency and just keep the gymnasium one.

@btaba

btaba commented Jun 7, 2024

Copy link
Copy Markdown
Collaborator

Ah ok, sorry I was misreading this. I think the right thing to do is what @lebrice is saying. Switch to gymnasium altogether and hash out differences in the API calls in brax. You can ignore brax/v1 entirely since it's deprecated. How does that sound?

@giotherobot

Copy link
Copy Markdown
Author

I can work on that, should be easier than what I was trying to do here!

@btaba

btaba commented Jan 31, 2025

Copy link
Copy Markdown
Collaborator

@giotherobot any updates? Will close the PR if there is no further activity

@lupusorina

Copy link
Copy Markdown

Will this PR be merged in soon? Thanks.

@giotherobot

Copy link
Copy Markdown
Author

@giotherobot any updates? Will close the PR if there is no further activity

The concern raised in #486 (comment) should be addressed by c5bb67f (#486) so I think this PR is ready.

@fei-yang-wu

Copy link
Copy Markdown

Is there any update on this PR?

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.

5 participants