Repository navigation
feat: support Python 3.11 for simulation and training - #128
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
It broadly alters cross-Python packaging, lockfile resolution, installer shell logic, CI, and a framework-wide @configclass default-copying semantics change, with the author noting the test suite was not run and HIP paths are unverified on hardware.
No open issues 🎉
What changed in this PR
This PR extends MotrixLab to support Python 3.11 for simulation and training while keeping the Unitree hardware runtime and full (--all) installs pinned to Python 3.10. It relaxes requires-python across workspace packages, adds a --python selector to install.sh with an --all/3.11 guard, expands CI to a Python 3.10/3.11 matrix, and updates installation docs in English and Chinese. It also carries two correctness-oriented refactors that 3.11 surfaced: @configclass now deep-copies callable dataclass defaults per instance (3.11 rejects unhashable mutable defaults), and generic NUMA/GPU-locality logic is consolidated into motrix_rl.numa with an explicit cuda/hip runtime dispatch (HIP PCI discovery isolated in a subprocess).
Changes:
- Allow Python 3.11 (
requires-python = ">=3.10,<3.12"), add installer/CI/doc support, and exclude Unitree on 3.11 via dependency markers and testimportorskip/--ignore. - Fix
@configclassto wrap callable dataclass defaults (e.g. reward/observation term configs) in per-instance deepcopy factories. - Move
gpu_numa_node,spawn_placement,apply_binding, and NVML/HIP discovery intomotrix_rl.numa;gpu_numa_nodenow dispatches explicitly oncuda/hip, keeping onlyselect_collector_cpusin the FastSAC provider.
| File | Description |
|---|---|
*/pyproject.toml (11 pkgs) |
Relax requires-python to >=3.10,<3.12; keep Unitree marker-gated in test group; add macOS resolution partition. |
install.sh |
Add validated --python option and --all/3.11 incompatibility guard; thread interpreter choice into uv sync. |
.github/workflows/tests.yml |
Matrix over Python 3.10/3.11; 3.11 path uses direct uv sync and ignores Unitree tests. |
motrix_env_core/.../config/decorate.py |
Drop callable(value) skip so callable configclass defaults are deep-copied per instance. |
motrix_rl/src/motrix_rl/numa.py |
Add spawn_placement, apply_binding, NVML/HIP probes, and gpu_numa_node(device_index, runtime). |
motrix_rl_builtin/.../async_impl/{numa,topology,train,worker}.py |
Reduce provider numa.py to CPU slicing; import shared helpers; pass explicit GPU runtime. |
motrix_env_core/tests/test_configclass.py, motrix_rl/tests/test_{numa,gpu_numa}.py, */tests/test_* |
Tests for configclass copy semantics, HIP probe isolation/caching, and runtime dispatch; Unitree imports made optional. |
README*.md, CONTRIBUTING.md, AGENTS.md, docs/.../installation.md, wiki/.../fastsac-*.md |
Document dual Python support and the NUMA consolidation. |
Review effort: Balanced
19f59f2 to
132766e
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
It spans build/CI infrastructure, a core @configclass default-copy semantics change affecting all config classes, and platform-specific NUMA/HIP code that cannot be hardware-verified, plus an undocumented Hygon install path, warranting human review.
1 open issue
Review effort: Balanced

Summary
Validation
Limitations