Repository navigation
Conversation
Move bench_env.py and bench_physics.py into the motrixlab CLI as `mxlab bench --mode env` and `mxlab bench --mode physics`, with the measurement logic living in motrixlab.benchmark. The env-mode train/play option becomes --env-mode to free the --mode name for the benchmark target. Physics mode re-executes its NUMA workers via python -m and both heavy modes are imported lazily so env mode stays lightweight. Also fix actions passed to DirectEnv as numpy arrays: both Direct and Manager torch frontends now receive a zero-copy tensor view. bench_live_metrics.py stays a standalone diagnostic script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bench/bench_env.py与bench/bench_physics.py内化为统一 CLI 命令mxlab bench:mxlab bench --mode env --env cartpole --duration 5—env.step()吞吐/延迟基准(NUMA shard 多 worker 共享测量窗口)mxlab bench --mode physics --robot g1-29dof --numa shard— MotrixSim 纯物理step_n基准(numactl 绑定 worker)motrixlab/src/motrixlab/benchmark/(runner/workload/report/physics),CLI 解析在motrixlab/commands/bench.py--env-mode,让出--mode作为基准目标选择;--numachoices 取并集、按 mode 校验motrixsim);physics worker 改为python -m motrixlab.commands.bench再执行copy_()报错,现与 ManagerEnv 一律转 zero-copy tensorbench_live_metrics.py为内部诊断工具,保留为独立脚本;bench/README.md更新指向新命令Test evidence
python -m pytest tests/test_bench_*.py motrixlab/tests -q→ 38 passed(含 spawn 集成 3 个)mxlab bench --mode env --env cartpole --steps 50 --num-envs 64/--duration 3 --numa single/--env-mode play真实运行正常mxlab bench --mode physics --num-envs 64/--numa node真实运行正常(本机单 NUMA,node 模式 no-op 提示符合预期)prek run --all-files相关文件全绿mxlab bench --mode env --numa node正确报错--numa node/_worker only apply to --mode physics