Add a task discovery API for backend combinations - #7046
Draft
AntoineRichard wants to merge 1 commit into
Draft
Conversation
`enumerate_task_presets` reports what a task declares, bucketed by selector target. It cannot say whether a declared combination works, and the two differ: OVRTX is kitless and cannot share a process with Kit physics, so `isaacsim_physx + ovrtx` is declared yet unusable, and a task can advertise a backend it has no configuration for. Finding that out on a GPU costs a whole run; finding it here costs one config load. `resolve` builds the config and runs the runtime validator, returning the configs the selection resolved to rather than a bare yes/no. That richer return answers a second question for free: `physics=physx` resolves to `PhysxAutoCfg`, which picks a concrete backend at launch, so an alias and the backend it selects are the same run. `is_selector` reads that off the resolved config instead of comparing against the names `physx` and `rtx`. Costs roughly 0.1s for the first combination of a task and 0.017s thereafter, about 13s across the registry.
AntoineRichard
force-pushed
the
antoiner/task-discovery-api
branch
from
August 13, 2026 13:30
6e8cf32 to
88f9da7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Gym registry is currently walked in two places that answer two different questions:
tools/environ_docs.pyreads what a task declares. That is what theenvironments.rsttables publish.The gap is not theoretical. A combination can be documented while being impossible to run — that is how the AnymalC-Direct rows advertised presets the task does not have (fixed by hand in #6914). Because CI never runs
update_environments_rst.py --check, nothing catches that class of drift.This adds
tools/task_discovery.py:Resolved mode is the useful part: the cross product is not all legal. OVRTX is kitless and cannot share a process with Kit physics, so
isaacsim_physx + ovrtxis declared yet unusable. Discovering that costs one config resolution; discovering it on a GPU costs a whole benchmark run.Automatic selectors are reported separately
physics=physx(PhysxAutoCfg) resolves to OvPhysX kitless and to Isaac Sim PhysX under Kit.renderer=rtx(_AutoRtxRendererCfg) behaves the same way. A selector and the backend it resolves to are therefore the same run, which is why the tables already say:That knowledge currently lives in three places — the docs prose, the filtering inside
environ_docs, and a downstream benchmark dispatcher — and they have already drifted apart.DiscoveredTask.selectorsexposes it as data instead:Detected by config type, not by name, so adding a selector upstream needs no edit here. Currently finds
physxon 50 tasks andrtxon 7.Whether a selector is redundant depends on how the caller launches, so discovery reports both and leaves the policy to the caller.
Equivalence with the current docs walk
resolve=Falsewas compared againstcollect_environment_doc_rows()across the whole registry:The one apparent RL-library difference is
environ_docs' ownRL_LIBRARY_OVERRIDEStable, applied downstream where it belongs.Scope, and what is deliberately not here
This lands the module only. Nothing in-repo consumes it yet — that is intentional, so the equivalence above can be reviewed on its own before working doc generation is touched. Planned follow-ups in this PR:
collect_environment_doc_rows()delegates todiscover_tasks(resolve=False), keepingapply_rl_library_overridesand_physics_names_for_docswhere they are, withupdate_environments_rst.py --checkprovingenvironments.rstis byte-identical.--checkmode that reports declared-but-unresolvable combinations so CI can fail on doc drift.Two things I would like reviewer input on:
_selector_namesloads the env config a second time (once viaenumerate_task_presets, once viacollect_presets), roughly doubling declared-mode cost. Reusing a single walk means duplicating_bucket_variants_by_target; exposing the walked configs frompreset_cliwould be cleaner but widens this PR.tools/matchesenviron_docs.py, but if this should be a supported API for out-of-tree consumers,source/isaaclab_tasks/isaaclab_tasks/utils/may be the better place.Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatsource/isaaclab/changelog.d/