Parent: #1259
Depends on: #1255
Parallel with: #1256 and the MuJoCo BatchEnvPool capability investigation
一句话问题
MBA 的 G1 motion tracking partial reset 只重置约 251/8192 个 env,却在 reset 后通过 MotionCommand 再做一次全 batch command/relative-state 计算,单步耗时 34.7–41.4 ms,占 reset_done 的 66%–67%。
为什么现在做
最小交付结果
让 MotionCommand 在 partial reset 后只更新必要的 reset 行,或复用本 control step 已有效的非 reset 状态;保持现有 Manager-Based lifecycle、motion sampling、metrics、observation、termination 和随机数语义。
In scope
落点限于 src/unilab/managers/command_manager.py 与 task-owned motion command term;仅在现有私有调用边界内传递/缓存 reset ids。
拆清 _update_metrics、motion refresh、robot-state refresh 和 relative transform 中哪些可复用、哪些必须重算。
为 reset rows 与 untouched rows 分别补状态、metrics、command 和 observation parity 测试。
用 排查:MBA reset / event manager 路径开销定位(reset_done 慢 5-6 倍) #1255 的 mba_reset_command_compute_ms 在 MuJoCo/Motrix 做同 commit before/after。
Non-goals
不改 ObservationManager partial-reset 计算;该方向由后续独立 child 决定。
不优化正常 update_state 的 observation/reward/getter 管线。
不改公共 CommandTerm lifecycle、NpEnv reset contract、backend contract 或 motion/reward 配置。
Owner 与预计改动
Acceptance criteria
Stop conditions
需要修改公共 CommandTerm.compute/post_compute 签名或 manager lifecycle。
需要新增 row-aware ObservationManager、SimBackend 方法或 task-specific env 分支。
数值/RNG parity 只能通过改变 motion sampling、metrics 或 reset observation 语义维持。
达到 15 文件、800 行或一个 PR 上限。
Parent: #1259
Depends on: #1255
Parallel with: #1256 and the MuJoCo BatchEnvPool capability investigation
一句话问题
MBA 的 G1 motion tracking partial reset 只重置约 251/8192 个 env,却在 reset 后通过 MotionCommand 再做一次全 batch command/relative-state 计算,单步耗时 34.7–41.4 ms,占 reset_done 的 66%–67%。
为什么现在做
最小交付结果
让 MotionCommand 在 partial reset 后只更新必要的 reset 行,或复用本 control step 已有效的非 reset 状态;保持现有 Manager-Based lifecycle、motion sampling、metrics、observation、termination 和随机数语义。
In scope
src/unilab/managers/command_manager.py与 task-owned motion command term;仅在现有私有调用边界内传递/缓存 reset ids。_update_metrics、motion refresh、robot-state refresh 和 relative transform 中哪些可复用、哪些必须重算。mba_reset_command_compute_ms在 MuJoCo/Motrix 做同 commit before/after。Non-goals
Owner 与预计改动
Acceptance criteria
mba_reset_command_compute_ms相对同 commit baseline 至少下降 50%;若达不到,报告分解并停止扩张。make test-all和适用 PR gate 通过。Stop conditions
CommandTerm.compute/post_compute签名或 manager lifecycle。