-
Notifications
You must be signed in to change notification settings - Fork 49
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
Enable gymnasium 1.0.0 and fix tutorials #4
Conversation
@@ -325,7 +339,7 @@ | |||
"\n", | |||
"observation, _ = env.reset()\n", | |||
"frames = [env.render()]\n", | |||
"for i in range(10):\n", | |||
"for i in range(30):\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these changes (10 steps to 30) relevant for the fix? Same for the motions_files
-> motions
change and commenting out frames?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 to 30 is just aesthetics, but motions_files -> motions must be fixed (however it is not related to #1) .
tutorial.ipynb
Outdated
@@ -24,9 +24,15 @@ | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [ | |||
"import os\n", | |||
"os.environ[\"MUJOCO_GL\"] = os.environ.get(\"MUJOCO_GL\", \"egl\")\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add comment here to try "glfw" or "osmesa" if egl throws errors (think "glfw" was the most robust pick for us)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the lines for consistency with the basic tutorials (i.e. keep this setup on the user side)
@@ -80,13 +86,21 @@ | |||
"outputs": [], | |||
"source": [ | |||
"device = \"cpu\"\n", | |||
"\n", | |||
"if Version(\"0.26\") <= Version(gymnasium.__version__) < Version(\"1.0\"):\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the lowerbound check here necessary? If lower versions are not supported, should just throw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, lower versions should not exist.
I will keep for now as-is, as this is consistent with the way we do it in the HumEnv. If we want to change that, let's do a dedicated change in both repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM although did not run the code. Might want to minimize number of changes to ones relevant for fixing #1
Fixes #1 in README and tutorial
Fix a bug in tutorial_benchmarking
Extend rendering for 30 frames / 1s for more meaningful videos.