Repository navigation
Disable environment browser options that cannot launch - #8520
kellyguo11 merged 24 commits into
Conversation
The Gym registry is walked in two places with two different answers. tools/environ_docs.py reads what a task declares, which is what the environment tables publish. Nothing reports what actually resolves, so a combination can be documented while being impossible to run: that is how the AnymalC-Direct rows in environments.rst came to advertise presets the task does not have. Add tools/task_discovery.py. discover_tasks(resolve=False) reports the declared view; resolve=True additionally builds each combination and runs the runtime validator, keeping only combinations that can run. Automatic selectors are reported separately from concrete backends. physics=physx resolves to OvPhysX kitless and to Isaac Sim PhysX under Kit, and renderer=rtx behaves the same way, so a selector and its target are the same run. Which of the two to drop depends on how the caller launches, so discovery reports both and lets callers decide. They are detected by config type rather than by name, so a new selector upstream needs no edit here.
Two defects in the first cut. ModuleNotFoundError subclasses ImportError, which was listed as a structural failure, so one uninstalled extra aborted the whole walk rather than skipping that task. A task whose config needs teleop or mimic simply cannot be inspected from a partial install; that is a property of the environment, not a broken registry. ``declared`` also collapsed two different answers into one. A config that cannot be loaded is unknown; a config that loads and declares nothing means the task runs on a fixed backend with no selectable alternative. 37 of 127 tasks are in the second group, and the environment tables render the two differently, so ``declared`` is now ``None`` only for the first. ``declared`` reports raw registry names, with BACKEND_MIRROR_NAMES exported so callers filter to suit what they are reporting.
The environment tables and the discovery API walked the Gym registry separately, so the same knowledge - which tasks are trainable, which presets they declare, which names mirror a backend selector - was maintained twice and had already drifted. Delegate the walk. The documentation policies stay here, because they are about how the tables read rather than what the registry contains: the implicit-PhysX inference, the manual RL-library overrides, and the render-time preset filtering are unchanged. Verified by generating environments.rst and environment-browser.js twice in one environment, once per implementation, in separate processes: both files are byte-identical. Note that `update_environments_rst.py --check` is not a valid test for this, because the generator's output depends on which optional backends are installed - a task shows `ovphysx` only when ovphysx is importable - so it conflates a code change with environment drift. The A/B comparison isolates the code change. Run with teleop and mimic installed so that all 127 tasks load; without them 31 configs are unloadable and never exercise the comparison.
Resolving a combination already builds its env config, so combinations can be compared on what they produce rather than on how they were spelled. Fingerprint the resolved config and collapse the matches: aliases fold into the backend they resolve to, and the no-token run folds into whichever preset the config already defaults to. Across the registry that turns 2024 declared combinations into 1045 distinct runs. Collapsing on the resolved config rather than on the backend is deliberate -- the Reach controller presets share a backend and are four different runs. What a task does with no tokens is reported separately as ``default``, since the collapse would otherwise hide it. This subsumes three name-based filters, all of which were wrong per task: * ``BACKEND_MIRROR_NAMES`` dropped every DOMAIN name matching a backend. On a task that exposes its backends only as ``presets=`` tokens, that was the sole handle: ``Isaac-Open-Drawer-Franka`` reported one mode instead of four. A DOMAIN name is now a duplicate only when the task also declares it on a typed axis. * ``_SKIP_PHYSICS`` dropped ``newton_mjwarp_vbd_proxy`` as a proxy variant. It is a real backend, and on ``Isaac-Lift-Cloth-Franka`` the only one that resolves. * ``_selector_names`` existed to let callers subtract aliases. It also missed selectors nested inside a variant, so it reported none for the cabinet tasks. Also: * An Isaac Lab API failure now drops the combination it was judging and logs it, instead of ending the whole walk; pass ``strict=True`` for the old behaviour. * ``collapse=False`` keeps every validated spelling, which is what documentation needs -- a preset naming the default of its own axis is still a token a reader can type. * ``RL_LIBRARY_PRIORITY`` and ``is_training_task`` are now owned here and imported by the docs generator, so the tables and the matrix cannot drift. ``rlinf`` was missing from the discovery copy. * ``Mode.presets`` documented that ``presets=`` composes across config paths and that discovery validates each name alone, so ``modes`` under-approximates a task with several independent preset axes. * ``modes`` documented as assuming a headless launch, since a visualizer, livestream or explicit experience is a Kit source that narrows the legal set. The changelog fragment is dropped: no source package changed, and nothing under tools/ is released.
The module was 49% prose: 240 lines of docstring and comment against 201 of code, much of it explaining bugs that no longer exist. That history belongs in the commit log, not in every reader's way -- _domain_presets carried 25 lines of docstring over 2 lines of code. Keep the contract and the non-obvious constraints: the headless-launch assumption, that presets compose across config paths but are validated one at a time, and why the collapse keys on the resolved config rather than the backend. Drop the narratives. Also folds the two single-use helpers into their call sites; the explicitness score now rides in the dedup map instead of being recomputed.
Sort resolution failures by what they mean instead of by which builtin they
happened to raise. Discovery's own imports -- two of them private sim_launcher
symbols -- now sit in their own try and raise DiscoveryError, so losing one is
reported as the API drift it is rather than escaping as a bare ImportError past
the per-combination handler and aborting the whole walk. That was the exact
failure strict= was added to make survivable, and it was not covered.
A missing extra is now caught as ModuleNotFoundError rather than ImportError,
which makes the ImportError entry in _INFRASTRUCTURE_ERRORS reachable and gives
it a meaning: a module that imports but no longer exports what a config asks for
is drift, not a rejection. Previously that entry was dead and its comment
described the opposite of the behaviour.
A task whose config will not load now reports no modes. It reported declared=None
("nothing is known") beside one all-None mode ("runs on its defaults"), which
contradict each other; a cross product of nothing known is not a cross product of
nothing declared. No task in a complete install hits this, but a partial one does.
Drop the field defaults on DiscoveredTask. They allowed a default-constructed
instance whose declared={} raises KeyError in the docs generator, and the one
construction site passes every field anyway.
Documentation corrections, all of them claims that did not survive checking:
Mode.physics/renderer None means "no token passed", not "declares none"/"headless";
only --visualizer kit is a Kit source, and the headless assumption is not hermetic
because LIVESTREAM is read from the environment and validation stops before the
Isaac Sim availability check; contrib tasks come from isaaclab_tasks, not from the
experimental package; -Eval tasks are separate registrations, not aliases; strict=
drops a combination, not a task; only the RL library ordering is shared with the
docs generator, so rlinf can differ between the two.
Add resolution tests against real configs, kept in their own module so the unit
tests stay runnable on pytest alone, and wire that unit module into tools-tests --
it was never running in CI, having been excluded as needing a full Isaac Lab
install, which is not true of it.
Two fixtures replace the monkeypatch boilerplate that five tests each repeated, and three merges remove cases that were re-asserting a neighbour: the declared cross product becomes one parametrized test over its three shapes, the two uncollapsed cases become one (a rejected token in the same table covers both), and the fingerprint's stability and discrimination are one property, not two. The argv guarantee moves into the error-taxonomy test, where it should hold on every branch rather than on one. Prose is cut where it restated itself rather than where it carried a fact -- the launch-baseline caveat keeps both leaks, LIVESTREAM and the missing Isaac Sim check, in half the words. Also corrects this file's own docstring, which still claimed selector detection was exercised by running a tool. Selector detection is gone and there is no tool; the resolver is covered by the companion module.
The module was 42% prose against 207 lines of code, because I had been putting reasoning in docstrings that belongs in the commit log and the PR. Every fact a caller needs to use the API correctly is kept -- the declared None-vs-empty distinction, the LIVESTREAM and Isaac Sim leaks in the headless assumption, the one-preset-at-a-time under-approximation, why ModuleNotFoundError is narrower than ImportError -- and the justifications around them are gone. 143 docstring lines to 107, 39 comment lines to 31.
Docstrings state the contract, not the reasoning behind it. Also fixes a docstring indent left mangled by an earlier edit, which ruff does not reflow.
The env constructor calls cfg.validate() before it builds anything, and tasks put their cross-axis rules there: Reach rejects the newton_ik action preset unless physics is Newton, and Lift rejects camera data types the Warp renderer cannot produce. Resolution stopped short of that call, so discovery reported those pairings as runnable and they failed on the first reset instead -- six OSMO jobs for Reach alone. Registry-wide this drops 1180 resolved combinations to 1027. Spot-checked: the Warp renderer keeps rgb and depth and loses albedo and simple_shading, which is exactly what lift_env_cfg allows, and albedo still resolves on isaacsim_rtx. No task loses every mode.
…overy-api-v2 # Conflicts: # .github/workflows/tools-tests.yml # tools/environ_docs.py
…uncher Develop moved under this branch: isaac-sim#8476 folded preset_cli and preset_target into isaaclab_tasks.utils.hydra, list_envs grew a public registry walk, and the launcher validators the tools/ module imported now take a dict, so every resolved combination was being dropped as an "API failure". Resolution now lives beside enumerate_task_presets as resolve_task_runs, which passes tokens through resolve_task_config(overrides=) instead of swapping sys.argv, and checks each combination with a new public isaaclab.app.validate_launch -- the scan and validation launch_simulation starts with, which now calls it too. Only ValueError counts as a rejection; any other error propagates. Across the registry that is 140 tasks and 1032 distinct runs in 133s, with no other exception raised and every default run accepted. ``isaaclab list_envs --resolve`` is the in-tree consumer. The tools/ module, its copies of the training-task filter and RL-library order, and its stubbed tests are removed; environ_docs is left as develop has it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he task resolver Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
| for physics in preset_map[PresetTarget.PHYSICS] or [None] | ||
| for renderer in preset_map[PresetTarget.RENDERER] or [None] |
There was a problem hiding this comment.
Supported raycaster runs disappear
resolve_task_runs skips valid runs that need an unset renderer. On Isaac-Lift-KukaAllegro-Camera and Isaac-Reorient-KukaAllegro-Camera, the raycaster_depth64, raycaster_depth128, and raycaster_depth256 presets replace the cameras with raycasters. An explicit renderer then fails the typed-selector check.
Because the renderer list is nonempty, every candidate except TaskRun() includes a renderer token. These supported raycaster runs therefore never appear in list_envs --resolve. Include None alongside the named physics and renderer choices before removing duplicate configs.
| launchable = combinations - rejected | ||
| kept = tuple( | ||
| [name for name in names if any(c[axis] == name for c in launchable)] for axis, names in enumerate(options) | ||
| ) | ||
| combinations = set(itertools.product(*(names or [None] for names in kept))) | ||
| rejected = combinations & rejected |
There was a problem hiding this comment.
Unchecked defaults look launchable
If a task rejects every displayed combination, launchable_selectors silently succeeds. It removes every name, rebuilds the choices as (None, None, None), and discards the original rejections. The browser then offers an unchecked default command with Copy enabled.
Guard the empty launchable set by raising or marking the task unavailable. Add a test where all combinations are rejected.
There was a problem hiding this comment.
The pair logic is gone; a task with no launchable combination now fails the generator (32e0f0f).
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Implementation (1), Style consistency (1). Other reviewed categories look good.
- PR description: Remove the Claude attribution, call the added resolve-task-runs test new, and support the 70-second claim with baseline/candidate revisions, command, hardware, installed backends, task count, warmup, and wall time.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Browser-only reachability pruning mutates the shared preset map, removing CLI-valid names from generated RST tables; apply pruning only while rendering browser rows.
- Style consistency: Selector labels duplicate PresetTarget values and depend on positional alignment, allowing silent token mislabeling; derive labels directly from the ordered targets.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 2 inline findings.
Automated review; human maintainers own approval decisions.
| } | ||
|
|
||
|
|
||
| _SELECTOR_AXES = ("physics", "renderer", "presets") |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Axis labels duplicate PresetTarget values
_SELECTOR_AXES restates PresetTarget.PHYSICS/RENDERER/DOMAIN.value and must stay positionally aligned with the separate targets tuple in collect_environment_doc_rows; reordering either silently mislabels emitted tokens. Derive labels from the targets instead.
There was a problem hiding this comment.
No longer applies: the axis constant and the pair derivation were removed in 32e0f0f.
| } | ||
| kept, incompatible = launchable_selectors(spec.id, options, rejected) | ||
| for target, shown, names in zip(targets, options, kept): | ||
| preset_map[target] = [name for name in preset_map[target] if name not in set(shown) - set(names)] |
There was a problem hiding this comment.
🟡 Warning · Implementation — Browser pruning rewrites RST preset data
row.presets also feeds format_presets_rst for the comprehensive and curated RST tables, so names dropped for a browser-only constraint (e.g. raycaster_depth64, still valid on the CLI) disappear there too. Prune when rendering browser rows.
There was a problem hiding this comment.
Nothing calls the RST table renderers any more; the update script only writes the browser data, so no published output changes.
| name that a task does not list is unsupported and fails during configuration | ||
| validation. | ||
|
|
||
| Not every pairing of listed names can run together: Kit and kitless runtimes |
There was a problem hiding this comment.
Is this true? Newton and RTX can share runtime
There was a problem hiding this comment.
I think this is too broad you're right
| } | ||
|
|
||
|
|
||
| def test_launchable_selectors_reports_pairs_and_drops_unreachable_names(): |
There was a problem hiding this comment.
We can remove the tests since the resolution was tested in the original stacked PR
resolve_task_runs returns (physics, renderer, presets) tuples with the no-token run first instead of TaskRun/TaskRuns classes, and imports validate_launch at module level. list_envs --show_presets now lists the combinations each task can launch headless; the separate --resolve flag is gone. The docs say what actually cannot share a process with Kit: OvPhysX and OVRTX, not Newton. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes the tuple-based resolver from isaac-sim#7046: is_task_run_launchable now takes a (physics, renderer, presets) tuple, and the generator passes its combinations through unchanged. The launchable_selectors tests are removed; the regenerated-file check still guards the browser data. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Could we send the valid combinations straight to the browser, including cases where a selector is omitted? Seems simpler than turning them into incompatible pairs and then working backwards in JS. Also, could the docs build generate this automatically? I don't think people will remember the manual regen from a full install. |
resolve_task_runs crossed only the declared physics and renderer names, so a run keeping one axis on the config default while naming the other was never tried: Isaac-Lift-KukaAllegro-Camera with physics=newton_mjwarp and a raycaster_depth preset launches but was not listed. Leaving an axis unset is now one more option on each; the collapse folds the duplicates. Across the registry this finds 1058 runs instead of 1032, in 178 s instead of 133 s. Also uses the functional validate(cfg) the contribution guide prefers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aunchable-runs # Conflicts: # source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py
…docs build The browser now receives each task's launchable (physics, renderer, presets) combinations, a selector left to the config included, instead of incompatible pairs it had to work backwards from. Each dropdown gains a "default" choice, so runs that need an unset selector, such as the KukaAllegro-Camera raycaster presets, are reachable; an option is disabled when no launchable combination contains it with the other current values. Displayed names no combination uses are still dropped, and a task with no launchable combination fails the generator. The docs build regenerates the rows from the task registry, so the published browser cannot go stale. Launch checks run in spawned worker processes: a full regeneration takes about 30 s instead of about 3 minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@maxkra15 Done in 32e0f0f, both points. The browser now gets each task's launchable combinations, an unset selector included, and each dropdown has a "default" choice, so |
|
run-ci |
…_envs` (#7046) # Description A task's presets say which physics, renderer and domain names it declares. Not every pairing of them can run. OVRTX and OvPhysX cannot share a process with Kit. Env configs also add their own cross-axis rules: for example, Reach accepts `newton_ik` only with Newton physics, and the Warp renderer cannot produce the shaded camera types. Today the only way to learn that a combination is illegal is to launch it. `resolve_task_runs(task)` in `isaaclab_tasks.utils.hydra`, beside `enumerate_task_presets`, answers that question without launching. Each declared combination goes through three checks: - it resolves through `resolve_task_config(overrides=...)`, with each physics and renderer preset, or that axis left to the config, crossed with each domain preset; - it passes the env config's own `validate()`; - it passes the new public `isaaclab.app.validate_launch`, for a headless launch without livestreaming. `validate_launch` is the scan and runtime check that `launch_simulation` starts with, and `launch_simulation` now calls it, so the resolver and the launcher share one rule. It returns `(physics, renderer, presets)` tuples, `None` on an axis left to the config. Combinations that resolve to the same config are listed once, so `physics=physx` folds into the backend it selects. The run a task gets with no tokens comes first. Across the registry, 140 tasks resolve to 1058 distinct runs in 178 s on one workstation. No error other than a rejection's `ValueError` is raised, and every task's default run is accepted. `uv run isaaclab list_envs --show_presets` now prints these runs, with the default marked, instead of the declared preset names. That is slower: about 1–2 s per task, so about 3 minutes for the whole registry, against 5 s before. `--keyword` narrows it. `docs/source/concepts/backends_and_presets.rst` and the quickstart describe it. Only `ValueError` counts as a rejection. Any other error propagates, so a broken task config is not mistaken for an illegal combination. ## Scope - No change to the docs generator here. #8520, stacked on this PR, feeds the environment browser from the resolver. - Results describe config validity, not machine availability. A Kit combination still lists on a kitless install. ## Tests `test_preset_kit_decision.py::test_resolve_task_runs_lists_each_launchable_combination_once` runs on `Isaac-Cartpole-Camera-Direct` (about 5 s). - **Behavior:** - OvPhysX and OVRTX never pair with Kit; - the Warp-renderer shading rule from the env config applies; - selectors fold into their targets. - **Regression:** dropping the `validate_launch` call, dropping `validate()`, or disabling the collapse each turns it red. Each mutation was checked. - **Existing coverage misses it:** `test_runtime_compatibility.py` checks single hand-built configs, not the enumeration. `test_runtime_compatibility.py` now calls `validate_launch` instead of its private copy of the same three calls. ## Type of change - New feature (non-breaking change which adds functionality) ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the `pre-commit` checks with `uv run isaaclab --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes - [x] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
|
run-ci |
…7046, #8520) (#8570) # Description Backports #7046 and #8520 to `release/3.0.0`. This adds the task-run resolver and launch validation from #7046, exposes launchable preset combinations in `isaaclab list_envs`, and uses those combinations to disable environment-browser options that cannot launch. The backport preserves the release branch split between `preset_cli.py` and `preset_target.py`, and regenerates browser data for its 136 registered training environments. #8520 is still open upstream. This backport carries its feature diff through upstream head `ba91494b9`; the commits added after the previously reviewed head are base-branch merges and do not change that feature diff. ## Type of change - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Documentation update ## Validation - Resolver and runtime compatibility coverage: 28 passed - `list_envs` CLI coverage: 1 passed - Environment documentation generator check: up to date for 136 environments - Repository pre-commit hooks: passed - Changelog fragment gate against current `release/3.0.0`: passed The broader environment-documentation tests reached 39/40 passing on the macOS host. The remaining test imports a custom manager-based class through the optional Newton stack, which is unavailable in this host environment; CI should exercise that dependency on a supported platform. ## Screenshots Not applicable. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria to test changes - [x] I have added changelog fragments for every touched package - [x] My name already exists in `CONTRIBUTORS.md` --------- Co-authored-by: Antoine RICHARD <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Description
Depends on #7046. Until that merges, this diff includes its commits; compare against
antoiner/task-discovery-apito see only this PR's changes.The environment browser builds a launch command from three independent dropdowns: physics, renderer and preset. Of the 1262 combinations it offered, 342 failed at launch. #7704 caught one kind of failure with a hard-coded rule: Kit and kitless backends can't be mixed. The others went through:
depth;newton_ikwith non-Newton physics.The browser data now comes from the same checks the launcher runs.
is_task_run_launchable(task, run)inisaaclab_tasks.utils.hydrajudges one exact(physics, renderer, presets)combination: config resolution, the env config'svalidate(), andvalidate_launch. It shares one code path withresolve_task_runs.tools/environ_docs.pychecks every combination of the names each browser row displays, with each selector also allowed to stay unset, and ships the launchable ones as a new optional trailing field of the generatedtaskRows, one"physics|renderer|presets"string each. The checks run in spawned worker processes, so a full regeneration takes about 30 s.builder-initedhook, so the published browser cannot go stale. A docs-CI-like install (uv sync --extra dev) produces byte-identical data.Leaving a selector unset makes runs reachable that need it, such as
physics=newton_mjwarp presets=raycaster_depth64onIsaac-Lift-KukaAllegro-Camera. Names that cannot launch with any choice are removed from the browser; the command line is unaffected:depthonIsaac-Reorient-Cube-Shadow-Cameraand-Direct. The task's own config check rejects depth-only training.ovrtxon the threeIsaacContrib-PickPlace-*rows and the threeIsaacContrib-Stack-Cube-Galbot-*-Visuomotor*rows. Those tasks only offer Kit physics, which OVRTX can't share a process with.A task with no launchable combination fails the generator, and so the docs build, instead of shipping an unchecked default.
Tests
is_task_run_launchableshares one code path withresolve_task_runs, which #7046 tests. The generated data is guarded byupdate_environments_rst.py --checkand by the docs build regenerating it.Checked by hand on a locally built copy of the docs:
update_environments_rst.py --checkpasses on the branch.Type of change
Release backport
developChecklist
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there🤖 Generated with Claude Code