[envpool] Upgrade tests to Python 3.12 and MuJoCo 3.x - #333
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99b6e27b9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if task == "Pusher" and version == "v5": | ||
| extra_args.update( | ||
| { | ||
| "xml_file": "pusher_v5.xml", | ||
| "reward_after_step": True, | ||
| "weighted_reward_info": True, |
There was a problem hiding this comment.
Thread
xml_file through the other v5 MuJoCo envs
Gymnasium v5 restored the xml_file kwarg across the MuJoCo suite, but here only Pusher and Walker2d get it. HopperEnv, AntEnv, HumanoidEnv, HumanoidStandupEnv, Inverted*, Reacher, HalfCheetah, and Swimmer still hard-code their asset path, so calls like make_gymnasium('Hopper-v5', xml_file='custom.xml') will fail during config generation instead of loading the custom model. That blocks one of the main v5 features for most of the newly added env IDs.
Useful? React with 👍 / 👎.
| ++elapsed_step_; | ||
| done_ = (terminate_when_unhealthy_ ? !IsHealthy() : false) || | ||
| done_ = (terminate_when_unhealthy_ ? !is_healthy : false) || | ||
| (elapsed_step_ >= max_episode_steps_); | ||
| WriteState(reward, xv, x_after); |
There was a problem hiding this comment.
Emit the Gymnasium v5 info fields for Hopper/Walker2d
This upgrades Hopper/Walker2d to the v5 reward semantics, but WriteState() still only exports x_position and x_velocity. Gymnasium v5's info for these envs also includes the reward breakdown (reward_forward, reward_ctrl, reward_survive) plus z_distance_from_origin, so downstream logging and wrappers that expect the standard v5 info dict will silently lose those fields when switching to EnvPool's -v5 registrations. envpool/mujoco/gym/walker2d.h has the same WriteState(reward, xv, x_after) pattern.
Useful? React with 👍 / 👎.
Summary
manual_restore/workflows/so they can be moved back from a machine withworkflowscope.This keeps the Python 3.12 bring-up and the MuJoCo 3.x migration in one coherent update, while preserving the existing test surface instead of hiding failures behind new skips.
Technical Details
rules_pythonto a WORKSPACE-compatible 0.27 release, switch Bazel pip setup frompip_installtopip_parsewith dev/release lockfiles, vendor MuJoCo 3.3.4 plus Gymnasium v5 XML overlays, and update the MuJoCo/VizDoom tests so they still exercise the same paths under the newer dependencies.WORKSPACE,envpool/workspace0.bzl,envpool/workspace1.bzl,envpool/pip.bzl: Python 3.12 toolchain registration,rules_pythonupgrade, and lockfile-based pip setup.envpool/mujoco/gym/registration.py,envpool/mujoco/gym/*.h,third_party/mujoco_gym_xml_patches/*: MuJoCo 3.x backend updates and Gymnasium v5 env/XML alignment.envpool/mujoco/*align*_test.py,envpool/vizdoom/vizdoom_pretrain_test.py: test updates; no new skip/xfail markers were introduced, andtest_d3keeps its quality gate while running in a subprocess.manual_restore/workflows/*: workflow YAML parked here after PushPatrol rejected direct.github/workflows/*updates withoutworkflowscope.requirements-dev-lock.txtandrequirements-release-lock.txtfiles preserve that split under newerrules_python.Test Plan
Automated
git diff --unified=0 origin/main -- . ':!third_party/pip_requirements/requirements-*-lock.txt' | rg -n "skip|xfail|pytest\.mark\.skip|self\.skipTest|@unittest\.skip|absltest\.skip": no new skip/xfail markersgit diff --check: passbrix ssh dev -C -- 'cd /root/code/envpool && bazel test //envpool/mujoco:mujoco_gym_align_test //envpool/mujoco:mujoco_gym_deterministic_test //envpool/vizdoom:vizdoom_pretrain_test --test_output=errors --cache_test_results=no --config=test': passbrix ssh dev -C -- 'cd /root/code/envpool && bazel test //envpool/vizdoom:vizdoom_pretrain_test --test_output=errors --cache_test_results=no --config=test': pass after restoring the D3 quality gatebrix ssh dev -C -- 'cd /root/code/envpool && make bazel-test': pass (30/30)Suggested Manual
manual_restore/workflows/lint.yml->.github/workflows/lint.ymlandmanual_restore/workflows/release.yml->.github/workflows/release.ymlfrom a machine withworkflowscope, then push the branch againmake bazel-build: recheck the build path separately, since this series focused on test/runtime compatibility and not the wheel build path