Skip to content

Return optional MJX substep states - #365

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:issue-296-return-substeps
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:issue-296-return-substeps

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Adds an opt-in return_substeps argument to mjx_env.step so callers can accumulate rewards or metrics over frame-skipped simulation states.

The existing path is unchanged by default and continues to return only the final mjx.Data, without storing scan outputs. With return_substeps=True, the function returns (final_data, substeps), where the substep pytree has a leading axis of n_substeps.

Addresses #296.

Tests

  • Added a focused MJX regression covering three returned substeps.
  • Verified substep times, final-state equality, and backward-compatible default output.
  • pytest mujoco_playground/_src/mjx_env_test.py: passed.
  • Ruff and Pyink checks for the new test file: passed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant