Repository navigation
[Fix] Set Warp's global determinism mode under --deterministic - #7561
Conversation
Newton's solvers take a deterministic argument and apply it as a per-module option, so the solver kernels already honoured PhysicsCfg.deterministic. Its sensor and geometry kernels take no such argument and fall back to warp.config.deterministic, which stayed at NOT_GUARANTEED. The scene BVH is built over a shape list compacted with wp.atomic_add, so its primitive order varied between processes. Ray queries then broke ties differently and a tiled camera rendered a few pixels differently from bit-identical simulation state, which was enough to make an image-observation policy diverge. Warp reads the setting at module build time, so it is requested in apply_env_overrides, before the environment is created. An explicitly chosen mode is left alone.
…un-to-run NewtonCfg.deterministic_mode maps to the same warp.DeterministicMode enum the global uses, so a backend asking for gpu_to_gpu was getting the stronger guarantee on its solver kernels and a weaker run_to_run everywhere else. The config strings are the enum members lowercased, so the mode is resolved by name rather than by duplicating Newton's mapping table.
The previous guard skipped the request whenever warp.config.deterministic was not NOT_GUARANTEED, treating any non-default value as a deliberate choice. It cannot tell one from the other, and it left a configured gpu_to_gpu below the requested guarantee when something had already selected run_to_run. The modes are ordered by strength, so the request now only ever raises the setting: a stronger guarantee already in place is kept, a weaker one is upgraded.
|
run-ci |
Greptile SummaryThe PR makes deterministic training request Warp's process-global determinism mode before environment creation, preserving stronger configured guarantees.
Confidence Score: 4/5The PR needs the play and evaluation entrypoints to apply the new Warp request before merging, otherwise --deterministic still leaves camera observations nondeterministic on those supported paths. The mode mapping and training call order are sound, but the shared CLI flag reaches play entrypoints that create environments without invoking the newly added global Warp configuration. Files Needing Attention: source/isaaclab_rl/isaaclab_rl/entrypoints/common.py and the play entrypoints Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
Flag[--deterministic] --> Train[Training entrypoints]
Flag --> Play[Play entrypoints]
Train --> Overrides[apply_env_overrides]
Overrides --> Warp[Set Warp deterministic mode]
Warp --> TrainEnv[Create training environment]
Play --> Seed[Configure seed only]
Seed --> PlayEnv[Create play environment]
PlayEnv -. missing Warp request .-> Warp
Reviews (1): Last reviewed commit: "Raise Warp's determinism mode instead of..." | Re-trigger Greptile |
| physics_cfg = getattr(getattr(env_cfg, "sim", None), "physics", None) | ||
| if physics_cfg is not None: | ||
| physics_cfg.deterministic = True | ||
| request_warp_determinism(physics_cfg) |
There was a problem hiding this comment.
Play paths skip Warp determinism
When a camera-based play or evaluation command uses --deterministic, the play entrypoints configure the seed but never invoke apply_env_overrides or request_warp_determinism, causing Newton sensor and geometry kernels to retain Warp's nondeterministic default and camera observations to remain non-reproducible.
Knowledge Base Used: Learning workflows
There was a problem hiding this comment.
Isaac Lab Review Bot
The implementation correctly applies Warp’s process-global determinism mode before environment and BVH construction, but the reproducibility documentation overstates the scope of this behavior.
- Design and architecture: Applying the request in the RL entrypoint’s apply_env_overrides path satisfies Warp’s module-build-time ordering requirement and preserves stronger configured modes. The behavior is specifically tied to RL entrypoints, not AppLauncher globally.
- API: The documentation states that --deterministic sets warp.config.deterministic, although the new behavior only occurs when isaaclab_rl.entrypoints.common.apply_env_overrides is called. Qualify this promise as applying to the RL training entrypoints so standalone AppLauncher users are not given an incorrect contract.
- Implementation: The helper raises the Warp mode monotonically, preserves GPU_TO_GPU, tolerates absent physics configuration, and is covered by focused tests that restore the process-global setting through monkeypatch.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
| **Warp determinism.** Newton's solvers accept a ``deterministic`` argument that Isaac Lab supplies | ||
| from :attr:`~isaaclab.physics.PhysicsCfg.deterministic`, and they apply it as a per-module option. | ||
| Its sensor and geometry kernels take no such argument and fall back to ``warp.config.deterministic``, | ||
| so ``--deterministic`` sets that global to ``RUN_TO_RUN`` as well. Without it the scene BVH is built |
There was a problem hiding this comment.
🟡 Warning · Api — Warp determinism promise is not entrypoint-scoped
The paragraph opens by attributing --deterministic to AppLauncher.add_app_launcher_args and then states the flag sets warp.config.deterministic to RUN_TO_RUN. In this diff the global is only set by isaaclab_rl.entrypoints.common.apply_env_overrides, so a standalone script that launches with --deterministic but never calls that helper still renders Newton cameras with NOT_GUARANTEED. Qualify the sentence as applying to the RL training entrypoints, as the Torch and physics paragraphs already do.
AntoineRichard
left a comment
There was a problem hiding this comment.
I'd double check if we really need all these tests. Otherwise looks good.
There was a problem hiding this comment.
Are all these tests really required?
Six near-identical cases each set up a config and asserted one mode. They are one function over (already set, configured mode) -> expected, which covers two combinations the separate tests missed and drops roughly half the test code.
apply_env_overrides is a training-entrypoint helper, so --deterministic reached neither the physics config nor Warp's global on the play paths, which build their own environments. They now share a request_determinism() helper, called before the environment exists so Warp's module-build-time read still sees it. Also qualify the reproducibility docs: the flag configures Warp through the RL entrypoints, not through AppLauncher, so a script that builds its own environment must set warp.config.deterministic itself.
|
run-ci |
## Summary - Bumps Newton from `1.5.1` to `1.6.0rc1`, the first release carrying [newton#4017](newton-physics/newton#4017), unblocking the MuJoCo tendon adapter that PR #7161 needs. - `warp-lang` and `mujoco`/`mujoco-warp` move with it, because `1.6.0rc1` requires them. - Pins `newton[sim]` in `[project].dependencies` as well, so a wheel built from this metadata resolves the fix rather than falling back to the newest stable. - Updates test literals in `isaaclab` and `isaaclab_newton` for Newton's new actuator class names, and asks for a determinism guarantee in the manipulation determinism test. # Description `resolve_fixed_tendon_actuator_columns` reads `mujoco.actuator_trntype` through an `ArticulationView`. Every Newton 1.5.x release rejects that with *"has custom frequency 'mujoco:actuator' which is not supported by ArticulationView"*; newton#4017 makes `ArticulationView` generic over custom frequencies. `1.6.0rc1` (published 2026-09-03) is the first release containing that fix — verified two ways: the merge commit `4055a159` is an ancestor of `v1.6.0rc1`, and `custom_frequency_label_attributes`, the symbol the fix introduces in `newton/_src/sim/model.py`, is present at `v1.6.0rc1` and absent at `v1.5.1`. No `1.6.0` final exists yet, and no 1.5.x backport carries the fix, so `1.6.0rc1` is the only released option. The release requires `warp-lang>=1.17.0` and `mujoco-warp~=3.12.0`, so those pins move too: | Package | Before | After | | --- | --- | --- | | `newton[sim]` | `1.5.1` | `1.6.0rc1` | | `warp-lang` | `1.16.0` | `1.17.0` | | `mujoco` | `3.11.0` | `3.12.0` | | `mujoco-warp` | `3.11.0` | `3.12.0` | `warp-lang` is pinned to the `1.17.0` release rather than left as `>=1.17.0`: Newton's prerelease enables prerelease resolution, and an unbounded bound then resolves to a nightly (`1.18.0.dev20260903`). ## Wheel installs get the pin too `[tool.uv].override-dependencies` only reaches `uv sync`, so it does not constrain a wheel built from this metadata. `1.6.0rc1` is a prerelease, which a default resolve skips, so a loose bound resolved `newton 1.5.1` — without newton#4017, the fix this bump exists to deliver. Since `wheel.yml` builds on every push to `develop`, that would have shipped. `[project].dependencies` now pins `newton[sim]==1.6.0rc1`, matching the override. A default resolve of the new metadata returns `1.6.0rc1` under both `uv pip compile` and `pip download`, with no `--pre` flag. `isaacsim-core==6.0.1.0` requires `newton[sim]==1.2.1`, so installing the `isaacsim` extra still needs an override — exactly as on `develop`, which carries an equally exact pin in the same place. ## Newton actuator class rename `1.6.0rc1` introduces `DrivePD` / `DriveNeuralMLP` / `DriveNeuralLSTM` alongside the existing `ControllerPD` / `ControllerNeural*`. Both names remain importable, so this is **not** a breaking API change and no production code changes. Tests in `isaaclab` and `isaaclab_newton` assert on the class name Newton *constructs with*, which switched to the `Drive*` form, so those literals are updated. ## Determinism `test_manipulation_env_determinism[cuda-Isaac-Open-Drawer-Franka]` failed on this branch in CI. Two separate questions: whether the bump caused it, and why it failed at all. **Not caused by the bump.** Each arm was run 5x on the same machine, because a single run of an intermittent test samples a coin rather than measuring it: | GPU | develop pins (`newton 1.5.1` / `warp 1.16.0` / `mujoco 3.11.0`) | this PR (`newton 1.6.0rc1` / `warp 1.17.0` / `mujoco 3.12.0`) | | --- | --- | --- | | RTX PRO 6000 Blackwell | 3 / 5 failed | 3 / 5 failed | | L40 | 3 / 3 passed | 4 / 4 passed | Both pin sets fail at the same rate on Blackwell and both are clean on L40, so the failure is hardware-dependent, not version-dependent. Intermediate Newton revisions (the commits before and at [newton#4119](newton-physics/newton#4119), the MuJoCo 3.12 bump) show the same behaviour, so neither Warp 1.17, MuJoCo 3.12, nor #4119 is implicated. **Why it failed.** The test asserted bit-reproducible rewards without ever asking for a determinism guarantee. Newton defaults to `wp.DeterministicMode.NOT_GUARANTEED`, under which Warp's atomics may accumulate in any order, so two runs of the same environment are not required to agree — the assertion was stricter than the configuration it ran under, and whether it held came down to GPU scheduling. The Newton-backed case now passes `deterministic_mode="run_to_run"`, which is exactly the guarantee this test asserts: one device, one process, run twice. `deterministic_mode` is a Newton setting, so the PhysX-backed `IsaacContrib-Lift-Cube-Franka` case leaves it unset and the helper keeps asserting that the mode is only applied to a `NewtonCfg` backend. This is a test-configuration fix, not a masking of the intermittency: the guarantee the assertion depends on is now actually requested. Related: [#7561](#7561) addresses the adjacent layer and does not overlap this PR. Newton's solvers take a per-module `deterministic` argument, which is what `deterministic_mode` reaches and what this PR sets; Newton's sensor and geometry kernels take no such argument and fall back to the `warp.config.deterministic` global, which #7561 raises from the same config field in the RL entrypoint. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Validation - `uv lock --check` — clean; the relock moves exactly the four packages above, and the `[project].dependencies` pin moves exactly one further lockfile line - Default resolve of the published metadata returns `newton==1.6.0rc1` under both `uv pip compile` and `pip download`, with no `--pre` flag - `uv run --frozen python -m pytest source/isaaclab/test/cli/test_wheel_builder_metadata.py source/isaaclab/test/cli/test_uv_run_pyproject.py` — 21 passed, which enforces that the two generated `uv-overrides.txt` files match the override table and that `[tool.isaaclab.versions]` mirrors the dependency pins - `uv run isaaclab -f` — passed - Full Docker + Tests suite — **48 passed / 0 failed** on `b184335e80b`
…7561) (#7586) # Description Backports #7561 to `release/3.0.0`. This branch cherry-picks the canonical merged commit `838fb6d66288cc5f452c3aa1b1ad57f420e0f0e4` with `-x` provenance. The change applied without conflicts or release-specific edits. The repository backport validator confirms an exact patch replay across all eight source paths, and the stable source/backport patch IDs match. | Field | Commit | |---|---| | Original merged change | `838fb6d66288cc5f452c3aa1b1ad57f420e0f0e4` | | Release base used | `1c754876008f0806fdcfda8e3a6b2f593b34d6fc` | | Backport commit | `6044466990af2cb4b54f07f3705e37f16e6a4d58` | | Stable patch ID | `643b6fbbd03866389488b17070db3504315b4a41` | ## Type of change - Bug fix (non-breaking change which fixes an issue) - Documentation update ## Release backport - This PR targets the active `release/3.0.0` branch directly. ## Validation - Repository exact-patch backport validation passed; all eight source paths are preserved. - Stable source/backport patch IDs match: `643b6fbbd03866389488b17070db3504315b4a41`. - `test_entrypoints_common.py` — 36 passed in an isolated uv environment. - All changed-file pre-commit hooks passed, including changelog and Git LFS checks. - `sphinx-lint` reported no problems for the modified RST files. - `git diff --check upstream/release/3.0.0...HEAD` passed. - The canonical project formatter and warning-as-error docs build cannot resolve the release lock on this macOS/arm64 host; Linux CI remains authoritative for those checks. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the available pre-commit checks - [x] The original documentation update is preserved exactly - [x] My changes generate no new warnings - [x] The original regression coverage is preserved and passes - [x] The `isaaclab_rl` changelog fragment is preserved - [x] The original contributor is already listed in `CONTRIBUTORS.md` Co-authored-by: hujc <[email protected]>
Description
--deterministicdid not make camera observations reproducible. TrainingIsaac-Cartpole-Camera --deterministicon an RTX PRO 6000 Blackwell splits into two bitwise-identical outcome clusters; on an L40 it does not. Reported as NVBug 6658578 against Isaac Lab 3.0 GA.Newton's solvers accept a
deterministicargument and apply it as a per-module option, so PR #7334 already covered the physics kernels. Its sensor and geometry kernels take no such argument and fall back towarp.config.deterministic, which stayed atNOT_GUARANTEED— Isaac Lab has never set it (git log --all -S "config.deterministic"is empty).The concrete path:
newton._src.geometry.bvh.compute_enabled_shapesclaims output slots withwp.atomic_add, so the enabled-shape order — and with it the primitive order the scene BVH is built over — varies between processes. Ray queries then break ties differently, and a tiled camera renders a few pixels differently from bit-identical simulation state. That is enough to make an image-observation policy diverge.apply_env_overridesnow also requestswp.config.deterministic = RUN_TO_RUN. Warp reads the setting at module build time and the BVH is built duringModelBuilder.finalize(), so the request must land before the environment is created —_apply_deterministic_requestat solver init is too late. An explicitly chosen mode such asGPU_TO_GPUis left alone.Type of change
Validation
Where the divergence starts, from the real training path with every renderer input fingerprinted per frame (6 runs, Blackwell). All geometric inputs are bit-identical at the frame where the output already differs:
Isaac-Cartpole-Camera --deterministic, epoch-25 reward, unique run dirs, 8 runs per arm:wp.config.deterministicset externally--deterministicwp.configsetArchitecture control on L40 (4gpu), 12 runs, unique run dirs: all identical — the defect does not reproduce on Ada, which is why PR #7334's L40-only validation missed it.
Unit tests: 31 pass in
test_entrypoints_common.py, including three added here covering the request, an explicit mode being preserved, and no change without the flag.Fixes NVBug 6658578.
Follow-up (not in this PR)
Newton-side: sensor and geometry modules should accept a
deterministicoption like the solvers do, rather than depending on a process global; andcompute_enabled_shapesproduces order-dependent output regardless of that setting.Checklist
pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there