refactor(reset)!: remove the v1.4 bool-mask reset compatibility layer (#2474) by TATP-233 · Pull Request #2494 · Motphys/UniLab · GitHub
Skip to content

refactor(reset)!: remove the v1.4 bool-mask reset compatibility layer (#2474) - #2494

Merged
TATP-233 merged 1 commit into
mainfrom
fix/issue-2474-reset-env-ids-compat
Oct 21, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
fix/issue-2474-reset-env-ids-compat

Conversation

@TATP-233

Copy link
Copy Markdown
Collaborator

Summary

  • The v1.4 fixed-width bool-mask reset compatibility layer is removed in v1.5 instead of v1.6, per the decision on the driving issue.
  • unilab.base.reset_selectors.resolve_reset_env_ids now fails closed with TypeError on any bool mask; the DeprecationWarning passthroughs in ResetMaskBuffer.resolve / resolve_reset_mask are gone.
  • EventManager loses the mask-form reset-term boundary: dispatch_reset, _detect_mask_form_reset, _reset_term_mask_form, and the mask dispatch branch in _call_reset_term are removed. Reset event terms are only called as func(env, env_ids, **params).
  • Internal mask consumers are unchanged: backend transactions (SimBackend.apply_reset / packed reset), the protected CommandTerm._resample_command(reset_mask) hook, NoiseModel.reset(reset_mask), and the motion-tracking tensor runtime keep the fixed-width mask form.
  • Tests migrate to env_ids selectors, including stale slow-lane fixtures that referenced the already-removed __call_mask__ / reset_mask APIs (they were red on main); changelog and both 1.4→1.5 migration guides now record the immediate removal.

User-facing impact: passing a bool mask to any public reset boundary (TorchEnv.reset, ManagerBase.reset and all manager/term reset hooks, EventManager.apply(mode="reset", ...)) now raises TypeError; EventManager.dispatch_reset no longer exists.

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        # mypy / pyright / ruff: all clean
make test         # 2760 passed, 0 failed
make test-all     # check + test-cov + benchmark smoke: passed on 334a7ed1
uv run pytest tests/envs/locomotion/g1/test_manager_terms.py -q -m slow   # 15 passed
uv run pytest tests/scripts/test_train_scripts.py::test_run_native_viewer_play_loop_runs_without_physics_state -q -m slow  # passed
uv run pytest tests/scripts/test_check_docs.py -q  # 20 passed

Remote CI route:

  • Base main: current-head CI link and status to be recorded once the run starts.

Impact

  • Backend impact: none (backend transaction mask form unchanged)
  • Platform impact: both (pure contract change, platform-independent)
  • Training effect expected: no

Artifacts

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

Checklist

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

…#2474)

The public reset contract speaks env_ids row indices only. Positional bool
masks now fail closed with TypeError in resolve_reset_env_ids; the
EventManager mask-form term detection (_detect_mask_form_reset), the
dispatch_reset wrapper, and all DeprecationWarning passthroughs are removed
in v1.5 instead of v1.6.

Tests migrate to env_ids selectors, including stale slow-lane fixtures that
referenced the already-removed __call_mask__/reset_mask APIs. The changelog
and both migration guides record the immediate removal.
@TATP-233
TATP-233 merged commit f1b5916 into main Oct 21, 2026
12 checks passed
@TATP-233
TATP-233 deleted the fix/issue-2474-reset-env-ids-compat branch October 21, 2026 14:39
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