You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Proposal] MJWarp: opt-in raise on capacity overflow, and do not report iteration limits as overflow #9345
Follow-up to #8801 / #9164. Add MJWarpSolverCfg.overflow_action ("debug" | "warn" | "raise", default "debug") so a run can report capacity overflows without debug mode, or stop at the first one; split MuJoCo Warp's ITERATIONS / LS_ITERATIONS bits out of the capacity report (they are non-convergence, not dropped contacts); add MJWarpSolver.peak_usage() for sizing njmax / nconmax.
Motivation
With debug_mode off, an overflow only prints a device line and training continues on worlds with dropped contacts or constraint rows.
Comparing nefc / nacon with the capacities after a step misses overflows inside substeps and in the broad phase; the overflow bits catch them. Measured on a 1,024-world humanoid + ball task with 33 contacts reserved per world: the BROADPHASE bit was set while contacts peaked at 24,535 of 33,792 and constraint rows at 161 of 200 (busiest world); the broad phase needed 34 per world.
mujoco-warp 3.17 / 4.0.1 set ITERATIONS / LS_ITERATIONS in the same mask; the current report names them as an exhausted capacity.
Minimal repro (no GPU)
Build an MJWarpSolver driver as the existing tests do (solver_driver(MJWarpSolver, MJWarpSolverCfg(), native)), give it an overflow observable [OverflowType.ITERATIONS, 0], and call check_step(False, True): it logs "MJWarp capacity overflow ... iterations. Increase the named capacity". With the bit OverflowBits.SOLVER_NCONMAX and check_step(False, False) nothing is reported and nothing can be made to raise.
Alternatives
Users request ObservableKind.OVERFLOW through NewtonManager.request_solver_observables and check it themselves (what we do now).
Activity