Skip to content

feat: backend iterations param, step timing, and bench script - #203

Merged
TATP-233 merged 3 commits into
mainfrom
feat/backend-iterations-and-timing
Apr 10, 2026
Merged

TATP-233 merged 3 commits into
mainfrom
feat/backend-iterations-and-timing

Conversation

@wlgys8

@wlgys8 wlgys8 commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add iterations field to EnvCfg and pass through to both MuJoCo (opt.iterations) and Motrix (options.max_iterations) backends
  • Change SimBackend.step() return type to dict | None, returning timing breakdown under {"timing": {...}} key (set_ctrl_ms, physics_ms, refresh_cache_ms)
  • Optimize Motrix backend: use step_n() for multi-substep, remove redundant np.asarray() wrappers, fix set_state to use correct data_slice for forward_kinematic
  • Add NpEnv.step() timing instrumentation with backend_ prefixed keys
  • Add scripts/bench_env_step.py: runs all task × backend combinations by default (go1/go2/g1 × mujoco/motrix) with box-drawing comparison table
  • Disable kp/kd randomization for Go2 offpolicy motrix config

Test plan

  • make test passes
  • Verify single-task bench: uv run python scripts/bench_env_step.py task=g1_joystick training.sim_backend=mujoco
  • Verify matrix bench: uv run python scripts/bench_env_step.py
  • SAC Go2 motrix training: uv run python scripts/train_offpolicy.py task=go2_joystick training.sim_backend=motrix

heng.zhang added 2 commits April 10, 2026 17:09
motrixsim methods return untyped (Any) values; wrapping with
np.asarray() provides the concrete ndarray type mypy expects.
@TATP-233

Copy link
Copy Markdown
Collaborator
  1. scripts/bench_env_step.py -> benchmark/benchmark_env_step.py
  2. CLAUDE.md -> AGENTS.md

@TATP-233
TATP-233 merged commit 79626a0 into main Apr 10, 2026
5 checks passed
@TATP-233
TATP-233 deleted the feat/backend-iterations-and-timing branch April 10, 2026 14:54
TATP-233 added a commit that referenced this pull request May 4, 2026
…ming

feat: backend iterations param, step timing, and bench script
TATP-233 added a commit that referenced this pull request May 30, 2026
…ming

feat: backend iterations param, step timing, and bench script
TATP-233 added a commit that referenced this pull request Sep 4, 2026
…ming

feat: backend iterations param, step timing, and bench script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants