-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update to gym 0.26 #12
Conversation
See [1] for a list of breaking changes. In particular we now - need to pass "render_mode" when initializing a gym environment, especially when we want to PixelObservationWrapper later, - need to split `done` into `truncated` and `terminated` and - need to return `info` in `reset`. Note that future Gym development will happen in the "Gymnasium" [2] fork, which is based on Gym 0.26. Migrating from Gym 0.26 to Gymnasium should be easy. [1] https://github.com/openai/gym/releases/tag/0.26.0 [2] https://github.com/Farama-Foundation/Gymnasium
@timokau appreciate the PR, thanks! Just to signal intention - this is indeed an upgrade we're looking to do, but we were waiting for the new API to stabilize (perhaps when v.1.0 is released?). Part of the reason is that we run mypy against our entire codebase and would prefer the types to fully settle before making this upgrade. For now we'll leave this PR open, but you've done a fair bit of legwork here so it should come handy once we upgrade - we'll make sure to attribute appropriately in any commits we pull in - thanks! |
Great, thanks for the update :) For what it's worth, I think gym(nasium) 0.26 is supposed to be fairly stable. Quoting from the release notes:
But yes, the dust has probably settled a bit more by the time 1.0 is released. |
Yeah – we'll see. Realistically, there's a decent amount on their roadmap that could end up impacting that plan once they're in the weeds. But if they stay on schedule we should know relatively soon 🙂 Another consideration for me is that I'd like to put off unpacking Did you try using |
That makes sense, getting this entirely right probably requires digging a bit deeper.
No I didn't try that, I don't remember why. Probably should have tried that first. |
I'm going to go ahead and close this, given that we'll probably start fresh when we're ready to make this change. Thanks for proposing it though! |
Note: I realize that this is a big change and you may decide not to merge this. I worked on it for my own purposes (applying the avalon dreamer baseline to gym 0.26 environments) and thought it would be best to propose it upstream, but I understand if you decide to close the PR. I have also not tested this exhaustively, I have only verified that it works for my purposes. So it is likely that there are still some mistakes and this PR would be a starting point rather than an immediately mergeable.
If you want me to run the test suite, I'd be happy to. In that case please let me know how best to do that (use the dockerfile? pytest?).
See [1] for a list of breaking changes. In particular we now
need to pass "render_mode" when initializing a gym environment, especially
when we want to PixelObservationWrapper later,
need to split
done
intotruncated
andterminated
andneed to return
info
inreset
.Note that future Gym development will happen in the "Gymnasium" [2] fork, which
is based on Gym 0.26. Migrating from Gym 0.26 to Gymnasium should be easy.
[1] https://github.com/openai/gym/releases/tag/0.26.0
[2] https://github.com/Farama-Foundation/Gymnasium