Skip to content

feat: harden autoreset graphs and MJWarp validation - #2693

Open
TATP-233 wants to merge 18 commits into
mainfrom
dev/issue-2681-autoreset-hardening
Open

TATP-233 wants to merge 18 commits into
mainfrom
dev/issue-2681-autoreset-hardening

Conversation

@TATP-233

@TATP-233 TATP-233 commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The overflow monitor remains opt-in. Reset diagnostics use interval semantics documented in the autoreset guide. This PR preserves the eager masked-autoreset state binding from #2685.

Linked Work

Validation

  • make test-all passed on the final local head before this PR was created or updated
  • Additional task-specific validation listed below

Final local head: 3ae2b29af0b1af5e1a86d7f5672625bd104e34de.

Commands actually run on that head:

uv sync --extra mujoco --extra mjwarp && make test-all
# 3070 passed, 64 skipped, 388 deselected
# benchmark smoke: 35/35 module-mode and 36/36 script-mode entrypoints passed

uv run --no-sync pytest tests/base/test_reset_state.py -m slow -k real_cuda_capture_replay -q
# 2 passed, 49 deselected: real CUDA capture/replay for root and joint caches

uv run --no-sync pytest 'tests/base/test_mjwarp_backend.py::test_g1_manager_publishes_capacity_overflow_on_first_control_step' -m slow -q
# 2 passed: interval=0 completed normally; interval=1 raised detailed capacity error on control step 1

uv lock --check
# passed

# The ROCm check used a temporary directory containing pyproject.rocm.toml as
# pyproject.toml and uv.rocm.lock as uv.lock, then ran:
uv lock --check --directory <temporary-directory>
# passed

git diff --check
# passed

Known existing slow-test limitation:

  • test_g1_walk_flat_owner_eager_capture_warmup_and_replay_share_semantics was also run repeatedly. It intermittently reports the same 7/196 observation mismatch on origin/main under UniSim 2.9.3 (3 failures in 5 runs), with similar results before and after this PR's guard changes. It is outside make test-all; this PR does not modify that unrelated test or claim the full slow matrix passes.

Remote CI route:

Final-head 2048-environment benchmark

RTX 4090, G1WalkFlat/MJWarp, 30 warmup + 200 measured control steps, one process per arm. Both processes exited normally.

uv run --no-sync scripts/benchmark/env/benchmark_env_step.py \
  task=g1_walk_flat/mjwarp num_envs=2048 num_steps=200 warmup_steps=30 \
  env.mjwarp_overflow_check_interval=0 \
  --emit-full-result-json /tmp/issue-2682-integrated-overflow-0.json

uv run --no-sync scripts/benchmark/env/benchmark_env_step.py \
  task=g1_walk_flat/mjwarp num_envs=2048 num_steps=200 warmup_steps=30 \
  env.mjwarp_overflow_check_interval=1 \
  --emit-full-result-json /tmp/issue-2682-integrated-overflow-1.json
interval Mean control step Median P95 Throughput
0 8.896856 ms 8.847413 ms 9.276801 ms 230,194 env-steps/s
1 10.264800 ms 10.246590 ms 10.621626 ms 199,517 env-steps/s

The mean control-step time increased by 15.4% in this single local paired configuration. This is not a performance-equivalence or cross-hardware claim.

Impact

  • Backend impact: both — MJWarp runtime validation and MuJoCo/MJWarp dependency alignment
  • Platform impact: Linux validated on NVIDIA CUDA; ROCm lock resolution checked, ROCm runtime not exercised; macOS not exercised
  • Training effect expected: yes — graph safety checks and interval reset diagnostics are active on applicable paths; overflow flushing is opt-in with default 0

Artifacts

  • W&B: none
  • benchmark result: final-head table above
  • video / screenshot: none
  • ONNX / checkpoint: none

Checklist

@TATP-233
TATP-233 requested a review from caozx1110 as a code owner December 3, 2026 12:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment