-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix PPO tutorial: Add gymnasium support and Mujoco rendering compatibility in Colab #3401
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3401
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0eaffc6 with merge base c1cd7ab ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @abhitorch81! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
…compatibility in Colab
a4cf591
to
448dee8
Compare
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
This looks sane from doc point of view, make sure you get approval for the content |
I have added changes with the Gymnasium library as Gym was failing with Google Colab so I have put a condition @AlannaBurke |
Fixes #3392
Description
This PR updates the
reinforcement_ppo.py
tutorial to improve compatibility with Google Colab and future-proof it forgymnasium
usage.Key Changes:
gymnasium
if available, otherwise fall back togym
InvertedDoublePendulum-v5
orv4
based on the gym versionMUJOCO_GL=osmesa
in Colab/headless environments to avoid OpenGL rendering errors from Mujocogymnasium[mujoco]
This makes the tutorial runnable out of the box in Google Colab, with improved robustness across versions.
Checklist