Skip to content

fix(env): commit MuJoCo model-field DR through host bridge - #2123

Merged
TATP-233 merged 1 commit into
mainfrom
fix/issue-2122-mujoco-model-field-dr
Oct 10, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
fix/issue-2122-mujoco-model-field-dr

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

  • Materialize the backend before startup model-field DR. Startup body_mass / body_com still sample once, commit full-width through the public SimBackend.set_state(..., randomization=...) boundary, and run before read-plan binding, the first reset, or a step. MuJoCo no longer attempts to commit startup DR before its public selected-reset/model pool exists.
  • Carry host-staged model-field DR through the packed HOST_BRIDGE tensor-event reset boundary. A tensor command carrier and body_mass, body_com (body_ipos), geom_friction, or PD gains now compose into one HostBridgeTransferPlan.apply_reset(..., randomization=...) call.
  • Fail closed when a backend does not declare TensorLifecycleCapabilities.reset_randomization; mapped scene patches remain unsupported on this boundary.
  • Add fake-boundary lifecycle/payload regressions plus a real MuJoCo FlashSAC G1 tensor-command regression for both startup and reset DR.
  • Update the English and Chinese Manager-Based architecture and DR contract documents for the revised lifecycle ordering and packed HOST_BRIDGE reset DR contract.

User-facing impact: downstream manager-based MuJoCo tasks using the tensor command carrier / HOST_BRIDGE path no longer need to disable the issue's startup/reset model-field DR terms.

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

Commands actually run:

make check
# Passed: ruff format/check, mypy, pyright, and test F401/F821/F811/F841 lint.

make test
# 1898 passed, 42 skipped, 497 deselected, 11 warnings.

make test-all
# Passed.
# Non-slow coverage suite: 1898 passed, 42 skipped, 497 deselected, 11 warnings.
# Benchmark smoke: module-mode 34/34; script-mode 35/35.

uv run pytest tests/envs/test_manager_based_rl_env.py tests/base/test_reset_state.py tests/envs/mdp/test_events.py -q
# 200 passed, 1 warning.

uv run pytest tests/envs/test_env_configs.py::test_flashsac_g1_motion_mujoco_tensor_command_model_field_dr_roll_out \
  -q -m slow --override-ini 'addopts='
# 2 passed, 1 existing non-writable NumPy array warning.

Remote CI route:

  • Base main: current-head CI link and status recorded below after the run starts.

Impact

  • Backend impact: mujoco (public HOST_BRIDGE lifecycle only; no backend-private access)
  • Platform impact: Linux
  • Training effect expected: yes — enables startup/reset model-field DR on the MuJoCo tensor command / HOST_BRIDGE path without changing the default task-owner DR configuration.

Artifacts

  • W&B: none
  • benchmark result: none
  • video / screenshot: none
  • ONNX / checkpoint: none

Checklist

  • Added or updated tests where needed
  • Updated docs if behavior or workflow changed
  • Linked the driving issue
  • Noted any follow-up work explicitly

Follow-up: if a future backend needs to distinguish scalar set_state DR support from packed host-bridge apply_reset DR support, add a dedicated public capability rather than probing backend internals.

@TATP-233

Copy link
Copy Markdown
Collaborator Author

Remote CI on current head ca5a7eabee7df48f79c5cb03a7fae435f4957ea6 completed successfully: CI run 38042119193 — ruff-lint, ruff-format, mypy, pyright, benchmark-smoke, and test (ubuntu-slim) all passed. Docs build also passed: Build Sphinx.

@TATP-233
TATP-233 merged commit f76b6d0 into main Oct 10, 2026
8 checks passed
@TATP-233
TATP-233 deleted the fix/issue-2122-mujoco-model-field-dr branch October 10, 2026 09:46
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.

1 participant