Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gymnasium Wrapper #421

Open
vyeevani opened this issue Nov 10, 2023 · 4 comments
Open

Add Gymnasium Wrapper #421

vyeevani opened this issue Nov 10, 2023 · 4 comments
Assignees

Comments

@vyeevani
Copy link

Lots of other frameworks seem to be switching to gymnasium. It'd be nice to also have a gymnasium wrapper in brax.

@btaba
Copy link
Collaborator

btaba commented Nov 10, 2023

Hi @vyeevani, is this what you're looking for or something else?

class GymWrapper(gym.Env):

@vyeevani
Copy link
Author

vyeevani commented Nov 10, 2023

It’s that except using Gymnasium instead of Gym. The imports would change and also the returns are different for the step API. For example, you’d need to also return truncations (that you can get from the EpisodeWrapper)

It's a simple enough lift, pretty much just headers, error checking, and pulling things out of info.

I think it's worth it because OpenAI's Gym isn't going to be maintained anymore with the aim of switching everyone over to Gymnasium (https://gymnasium.farama.org/)

@btaba
Copy link
Collaborator

btaba commented Nov 10, 2023

Ok, yeah the APIs are subtly different. Feel free to open up a PR with brax/envs/wrappers/gymnasium.py

@Surya-77
Copy link

Hi there, I noticed this open issue about adding a Gymnasium wrapper for Brax. It's been around 4 months since the last comment inviting @vyeevani to open a PR. I'm curious if there have been any updates or progress on implementing the Gymnasium wrapper? It would be helpful to get a status update on this.

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

No branches or pull requests

3 participants