[Odin] Reject Newton Warp + simple shading presets on the cartpole camera tasks - #7530
Conversation
The cartpole camera tasks let ``presets=`` select a renderer and a camera data type independently, so ``newton_renderer`` could be combined with one of the ``simple_shading_*`` presets. The Newton Warp renderer does not publish those data types, so the combination only failed in ``Camera._create_buffers`` at env construction, minutes into a run. Add a ``validate_config`` hook to both cartpole camera env configs, mirroring the guard the Shadow Hand camera task already has, so the combination is rejected during config resolution. The allow-list is shared in ``isaaclab_tasks.utils.presets`` and mirrors the keys published by ``NewtonWarpRenderer.supported_output_types``.
There was a problem hiding this comment.
Isaac Lab Review Bot
The change adds early config validation for incompatible Newton Warp and simple_shading_* preset combinations in both cartpole camera tasks, with migration guidance and focused regression coverage.
- Design and architecture: The shared validator and Newton Warp output allow-list are colocated with
MultiBackendRendererCfg, avoiding duplicate task-level contracts while keeping the change scoped to the two affected cartpole configurations. The allow-list is checked against the renderer’s published output types. - API: The behavior change is limited to rejecting configurations that the Newton Warp renderer cannot construct successfully. Supported Newton outputs and the tested Isaac RTX and OVRTX shading combinations remain accepted, and the changelog documents compatible alternatives.
- Implementation: The direct and manager-based configurations validate their respective camera paths correctly. Tests cover both tasks, incompatible shading combinations, representative supported Newton outputs, unaffected RTX paths, and allow-list drift. The contract test’s unbound renderer-method stand-in is somewhat coupled to the current implementation, but it directly verifies the duplicated renderer contract and does not warrant pre-merge action.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Greptile SummaryThe PR adds early validation for incompatible Newton Warp renderer and camera data-type presets in both cartpole camera configurations.
Confidence Score: 5/5The PR appears safe to merge, with the new validation aligned to the current renderer contract and covered across both cartpole camera configurations. The guard recognizes the resolved Newton renderer correctly, matches its published output types, leaves RTX configurations unaffected, and does not omit inherited validation. Important Files Changed
Reviews (1): Last reviewed commit: "Reject Newton Warp + simple shading on t..." | Re-trigger Greptile |
Drop the new public helper and allow-list from isaaclab_tasks.utils.presets and inline the check in each cartpole camera config, matching the existing inline guards in the Shadow Hand and Lift configs rather than introducing a third pattern. Trim the regression test to the contract it proves and tighten the changelog fragment.
|
The early failure is useful, but the renderer capability contract should not be copied into each task config. This comment was AI-generated. |
Description
Isaac-Cartpole-CameraandIsaac-Cartpole-Camera-Directexpose the renderer and the cameradata type as two independent
presets=selectors, sonewton_renderercan be combined withsimple_shading_constant_diffuse,simple_shading_diffuse_mdl, orsimple_shading_full_mdl.The Newton Warp renderer does not publish those data types, so the combination is accepted at
config resolution and only fails later, in
Camera._create_buffers, once the simulator hasalready started:
This showed up as 72 failed rows in a benchmark sweep (dispatch
20260901-153531, imagebuilt from
release/3.0.0atf88dbc59c82): every failure was one of the two cartpole cameratasks with
renderer=newton_rendererand one of the threesimple_shading_*presets, eachburning roughly 400 s of startup before raising. The same data-type presets completed normally
on
isaacsim_rtxandovrtx(107 completed rows), so the gap is specific to the Newton Warpbackend.
simple_shading_*is an Isaac RTX shading-mode setting that OVRTX aliases toLdrColor; Newton has no analogue.This PR adds a
validate_confighook to both cartpole camera env configs, mirroring the guardsShadowHandCameraEnvCfgandReorientEnvCfg(inlift_env_cfg.py) already have.configclass'svalidate()invokes it, so the combination now fails immediately at configresolution with an actionable message instead of after the simulator has come up. It also means
task-discovery tooling that calls
env_cfg.validate()(e.g. our benchmark harness) drops thesecombinations from the matrix automatically, rather than scheduling 72 jobs that are known to fail.
Whether the Newton Warp renderer should gain
simple_shading_*support is a rendering-teamdecision; this PR does not prejudge it.
One note for reviewers: the allow-list here was re-derived from
NewtonWarpRenderer.supported_output_types, which publishes 10 kinds, rather than copied fromShadow Hand. Shadow Hand's and Lift's literal sets list only 7, omitting
rgba,rgb_hdr,and
albedo, so they currently false-reject e.g.presets=newton_renderer,albedo. This PR usesthe renderer's actual 10 so cartpole's
albedopreset keeps working on Newton, which matches thesweep (no cartpole
albedorows failed). Fixing the two stale sets is left out of scope here.Type of change
Behaviour change:
presets=newton_renderer,simple_shading_*on the two cartpole camera tasks nowraises at config resolution instead of at env construction. It never produced a working run, so
nothing that used to train stops training. Migration guidance is in the changelog fragment: use
presets=newton_renderer,rgb, or keep the shading data types on an RTX backend withpresets=isaacsim_rtx,simple_shading_full_mdl.The generated environment browser lists renderer presets and data-type presets as flat,
independent lists and does not encode combinations (
Isaac-Reorient-Cube-Shadow-Camera-Direct,which already has this guard, still lists both), so no regeneration is needed.
Screenshots
N/A
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfile (changelog fragment; version files not edited per repo policy)CONTRIBUTORS.mdor my name already exists thereTest evidence
New test:
source/isaaclab_tasks/test/core/test_cartpole_camera_presets.py(12 cases). Itresolves the real configs via
resolve_presetsand callscfg.validate(); no simulator islaunched. Both tasks, both directions: Newton + each
simple_shading_*must raise;isaacsim_rtx/ovrtx+simple_shading_full_mdlmust still resolve;newton_renderer,rgbmuststill resolve.
With the fix:
With the two config files reverted to their
developcontent (guard removed, test unchanged):Neighbouring suites (Shadow Hand presets, env-cfg import rules) plus this one:
102 passed.uv run --frozen isaaclab -fpasses.The GPU/Isaac Sim rendering suites (
test_rendering_cartpole*.py,test_rendering_registered_tasks.py) were not run here. Checked statically instead: theirnewton_rendererparametrizations draw from_NEWTON_WARP_DATA_TYPESinrendering_test_utils.py, which is a strict subset of the allow-list, and theirsimple_shading_*cases pinisaacsim_rtx/ovrtx, so none of them hits the new guard.