Skip to content

Updates environment and installation docs - #5879

Merged
kellyguo11 merged 10 commits into
isaac-sim:developfrom
kellyguo11:automate-env-docs
May 31, 2026
Merged

kellyguo11 merged 10 commits into
isaac-sim:developfrom
kellyguo11:automate-env-docs

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

  • Add maintainer tooling (tools/environ_docs.py, tools/update_environments_rst.py) to auto-generate the comprehensive environment list in environments.rst from the Gym registry (RL libraries, presets, workflows, and inference task names), with manual overrides for RLinf-only tasks and camera task notes.
  • Introduce a shared clone snippet (isaaclab_latest_clone.rst) and a Sphinx substitution (|isaaclab_latest_branch|, default release/3.0.0-beta2) used across installation, quickstart, deployment, and policy docs; clone commands use parsed-literal so the branch name renders correctly.
  • Refresh environments.rst to stay in sync with the registry (166 training environments), update README links/version table for release/3.0.0-beta2, and clean up stale develop-branch compatibility warnings and a few doc link fixes.

Type of change

  • Documentation update

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels May 30, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation Update Review

This PR introduces significant improvements to the documentation infrastructure and environment listing. Here's my analysis:

Highlights ✨

1. Auto-generated Environment List

  • New tooling (tools/environ_docs.py, tools/update_environments_rst.py) that generates the comprehensive environment list from the Gym registry
  • This is a great maintainability win - ensures docs stay in sync with actual registered environments
  • Well-structured with proper test coverage in tools/test/test_environ_docs.py

2. Sphinx Extension for Clone Snippets

  • New docs/_extensions/isaaclab_docs.py provides custom directives like isaaclab-clone-commands, isaaclab-clone-https, isaaclab-quickstart-install
  • Uses a configurable isaaclab_latest_branch (default: release/3.0.0-beta2) that's centrally managed
  • Eliminates duplication of clone commands across multiple doc pages

3. Updated References to release/3.0.0-beta2

  • README.md links updated from main to release/3.0.0-beta2
  • Version table updated accordingly

Suggestions & Questions

1. Selective Install Documentation

  • The new include/selective_install.rst provides good coverage of the modular install system
  • Consider adding a brief note about when to use isaacsim vs kit-less mode for users who are unsure

2. Environment Count Validation

  • The generated table shows 166 training environments - is there a CI check to validate this number doesn't decrease unexpectedly?
  • The --check flag in update_environments_rst.py is good for CI, but consider adding it to pre-commit hooks

3. Copy Button CSS

  • The change in custom.css to keep copy button always visible (opacity: 1) is nice for discoverability

4. Removed Compatibility Warning

  • The PR removes the compatibility warning about Isaac Lab develop vs Isaac Sim develop branches
  • Is this intentional because the breaking change was resolved?

5. Minor Observations

  • In docs/conf.py, the new rst_prolog sets the substitution for |isaaclab_latest_branch| - good approach for consistency
  • The isaaclab_docs.py extension is well-documented with proper typing

Code Quality

  • Good separation between generation logic (environ_docs.py) and the CLI script (update_environments_rst.py)
  • Test coverage looks reasonable for the new tooling
  • The RL_LIBRARY_OVERRIDES dict for tasks without cfg entry points is a practical solution

Overall this is a well-structured documentation improvement that will reduce maintenance burden and ensure consistency across the docs.

@greptile-apps

greptile-apps Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces maintainer tooling to auto-generate the comprehensive environment table in environments.rst from the Gym registry, adds a shared Sphinx extension (isaaclab_docs.py) that embeds a pinned release branch into all clone/install snippets, and refreshes documentation links and the version table to release/3.0.0-beta2.

  • New tooling (tools/environ_docs.py, tools/update_environments_rst.py): collects RL-library entry points, preset selectors, workflow types, and inference-task mappings to keep environments.rst in sync with the registry, with unit tests covering edge cases well.
  • Sphinx extension (docs/_extensions/isaaclab_docs.py): four custom directives render copy-friendly clone and install snippets using the configurable isaaclab_latest_branch value; the Windows quickstart snippets omit the uv installation step that the Linux snippets include, and an unguarded self.options["platform"] access will raise a bare KeyError if a future directive use omits :platform:.
  • Docs refresh: environments.rst is updated to 166 training environments with auto-generation markers, README links point to release/3.0.0-beta2, and stale develop-branch compatibility warnings are removed.

Confidence Score: 4/5

Safe to merge — all changes are documentation and maintainer tooling with no impact on runtime code.

The core logic in environ_docs.py is well-tested and correct. The new Sphinx extension works for all current directive uses. The small inconsistencies (Windows missing uv install step, _branch fallback vs registered default, unguarded platform key) are all confined to documentation generation and would surface as doc-build warnings rather than silent data errors.

docs/_extensions/isaaclab_docs.py — the _branch fallback and unguarded :platform: option access; docs/source/setup/quickstart.rst — Windows snippets missing the uv install step.

Important Files Changed

Filename Overview
docs/_extensions/isaaclab_docs.py New Sphinx extension with four custom directives; _branch fallback/default inconsistency and unguarded self.options["platform"] key access
tools/environ_docs.py New registry-to-RST helper module; find_inference_task_name assumes all task IDs end in -v0
tools/update_environments_rst.py Maintainer script wiring environ_docs helpers; straightforward and correct
tools/test/test_environ_docs.py Solid unit-test coverage for all public helpers including edge cases
docs/conf.py Adds isaaclab_docs extension and isaaclab_latest_branch config value
docs/source/overview/environments.rst Refreshed to 166 environments with auto-generation markers
docs/source/setup/quickstart.rst New quickstart page; Windows snippets missing uv install step
README.md Version table and doc links bumped to release/3.0.0-beta2
source/isaaclab/test/install_ci/uv_pip/test_uv_pip_install_isaaclab_rl_tasks_imports_rl_tasks.py New CI test verifying RL imports work without isaacsim

Reviews (1): Last reviewed commit: "Updates environment and installation doc..." | Re-trigger Greptile

Comment on lines +99 to +103
def run(self) -> list[nodes.Node]:
branch = _branch(self.config)
platform = self.options["platform"].strip().lower()
if platform not in {"linux", "windows"}:
raise self.error(f"Unsupported platform '{platform}'. Use 'linux' or 'windows'.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Missing :platform: silently raises KeyError

self.options["platform"] raises a bare KeyError when the directive author omits :platform:. directives.unchanged_required validates the value only when the option is present; it does not make the option required by the framework. Any .rst file that includes .. isaaclab-quickstart-install:: without :platform: linux/windows will produce a cryptic traceback at doc-build time rather than a helpful directive error.

Comment on lines +16 to +18
def _branch(config) -> str:
"""Return the release branch pinned in installation docs."""
return getattr(config, "isaaclab_latest_branch", "main")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The _branch fallback is "main", but the registered default in setup() is "release/3.0.0-beta2". These two values should agree so that if the extension is ever used outside a fully-configured Sphinx app, the branch embedded in clone snippets does not silently revert to main.

Suggested change
def _branch(config) -> str:
"""Return the release branch pinned in installation docs."""
return getattr(config, "isaaclab_latest_branch", "main")
def _branch(config) -> str:
"""Return the release branch pinned in installation docs."""
return getattr(config, "isaaclab_latest_branch", "release/3.0.0-beta2")

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread docs/_extensions/isaaclab_docs.py Resolved
Comment thread tools/environ_docs.py
Comment on lines +174 to +181
def find_inference_task_name(task_id: str, registry_ids: set[str]) -> str | None:
"""Return the inference/play task ID paired with *task_id*, if registered."""
base = task_id.rsplit("-", 1)[0]
for suffix in _INFERENCE_TASK_SUFFIXES:
candidate = f"{base}{suffix}"
if candidate in registry_ids:
return candidate
return None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Version suffix stripped unconditionally in inference-task lookup

task_id.rsplit("-", 1)[0] always drops the trailing token (e.g. v0), then appends -Play-v0 / -Eval-v0 to build the candidate. If a future task is registered as -v1 or -v2, the lookup will silently fail to find its matching -Play-v1 or -Eval-v1 inference variant, producing a blank "Inference Task Name" cell.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Code Review — Updated for Latest Push (cf15634)

This PR makes strong structural improvements to documentation maintainability. I've re-reviewed after the second commit ("allow for kitless pip install") and have some actionable findings:


Finding 1: Algorithm Label Accuracy Loss in Auto-Generated Environment Table

Severity: Medium | tools/environ_docs.py

The _infer_algorithm() function defaults to "PPO" when there's no suffix on the entry-point key. This causes information loss for tasks that previously had distinct algorithm labels:

  • Isaac-Repose-Cube-Shadow-OpenAI-FF-Direct-v0: was rl_games (FF) → now rl_games (PPO)
  • Isaac-Repose-Cube-Shadow-OpenAI-LSTM-Direct-v0: was rl_games (LSTM) → now rl_games (PPO)

The issue is at line ~277 in environ_docs.py:

def _infer_algorithm(algo_suffix: str, entry_value: object, library: str) -> str:
    if not algo_suffix:
        if library == "rl_games" and isinstance(entry_value, str) and "vision" in entry_value.lower():
            return "VISION"
        return "PPO"  # ← loses FF/LSTM distinction

Suggested fix: Extend the heuristic to check for "lstm" or "ff" in the entry-point value string, similar to the existing "vision" check. Alternatively, add these to RL_LIBRARY_OVERRIDES.


Finding 2: --enable_cameras Annotation Dropped Without Replacement

Severity: Medium | docs/source/overview/environments.rst

The old table included (Requires running with --enable_cameras) annotations on camera-based environments (e.g., Isaac-Cartpole-Camera-Showcase-*, Isaac-Repose-Cube-Shadow-Vision-Direct-v0). The auto-generated table removes these entirely without any alternative indication.

Users running these tasks without --enable_cameras will get non-obvious failures. Consider adding a footnote or a "Camera" workflow tag, or noting the requirement in the environ_docs.py row generation (perhaps from a special entry-point kwarg).


Finding 3: [kitless] Extra Includes PyOpenGL-accelerate — Platform Compatibility

Severity: Low | tools/wheel_builder/res/python_packages.toml

The new [kitless] extra pins PyOpenGL-accelerate==3.1.10. This package requires compilation (C extension) and can fail on systems without appropriate build tools. On Windows especially, pre-built wheels may not be available for all Python versions.

{ "kitless" = [
    ...
    "PyOpenGL-accelerate==3.1.10",
    ...
] }

Consider adding a note in the pip installation docs that this may require build tools, or make this optional (e.g., platform-specific markers).


Finding 4: selective_install.rst Is an Include Fragment — Verify .. _installation-selective-install: Label Placement

Severity: Low | docs/source/setup/installation/kitless_installation.rst

The cross-reference label .. _installation-selective-install: is defined in kitless_installation.rst just before the .. include:: include/selective_install.rst directive. Since the label lives outside the included content, it correctly anchors to the section. However, selective_install.rst starts with a ~~~~~~~~ heading (subtitle level). If it's ever included from a different context with different heading hierarchy, the heading levels could conflict.

This is fine for now but worth noting for future includes.


Finding 5: isaaclab_pip_installation.rst — [all] Extra Description Ambiguity

Severity: Low | docs/source/setup/installation/isaaclab_pip_installation.rst

The extras table states:

all — RL frameworks only (SB3, SKRL, RSL-RL). Combine with isaacsim for a full install

But the source code in python_packages.toml shows [all] also includes onnxscript, tqdm, and rich — not just RL frameworks. The description "RL frameworks only" is slightly misleading. Consider: "RL frameworks and common training utilities."


Finding 6: Windows Quickstart Snippet Missing uv Install Step

Severity: Low | docs/_extensions/isaaclab_docs.py

The _quickstart_kitless function includes a curl ... | sh uv installation step for Linux but the Windows variant assumes uv is already installed. While uv installation differs by platform, new users on Windows may not have uv. A comment pointing to uv's install docs (e.g., :: Install uv: https://docs.astral.sh/uv/getting-started/installation/) would help.


Overall Assessment

This is a well-structured PR that significantly improves documentation maintainability:

  • ✅ Centralized branch management via Sphinx config
  • ✅ Auto-generated environment table with proper CI check flag (--check)
  • ✅ Good test coverage for the new tooling
  • ✅ Clean removal of stale compatibility warnings
  • ✅ New [kitless] pip extra properly separates Newton-only installs

The most impactful findings are #1 (algorithm labels) and #2 (camera annotations), which represent information loss in the migration from manual to auto-generated docs.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Code Review — PR #5879 (Updated for Latest Commit 7f50812)

This PR delivers substantial documentation infrastructure improvements: auto-generated environment tables, shared Sphinx directives for clone/install commands, and a new kitless pip extra. The third commit corrects the default branch from release/3.0.0-beta2 to develop and adds a README compatibility warning.


✅ What Works Well

  1. DRY documentation via Sphinx directives — isaaclab_docs.py eliminates copy-paste of clone/install commands across 6+ pages. Branch updates now happen in one place.
  2. Auto-generated environment table — tools/environ_docs.py with START-AUTO-GENERATED / END-AUTO-GENERATED markers makes the comprehensive table maintainable. The --check flag enables CI enforcement.
  3. Strong test coverage — tools/test/test_environ_docs.py (246 lines) covers parsing, rendering, and patching logic.
  4. Changelog entry — Breaking changes to pip extras are clearly documented.
  5. Modular install documentation — Refactoring the selective install section into a standalone include (selective_install.rst) improves reusability.

🔍 Findings

Finding 1: Default Branch Inconsistency Between conf.py and README

Severity: Low | README.md + docs/conf.py

The README references release/3.0.0-beta2 in the version table while conf.py now defaults isaaclab_latest_branch to develop. This is intentional (the table tracks Isaac Sim compatibility) but could confuse contributors about which branch to clone.

Suggestion: Add a brief comment in the README version table clarifying that clone commands use develop (via Sphinx) while the table maps stable releases.


Finding 2: Algorithm Label Fallback in _infer_algorithm() May Lose Precision

Severity: Medium | tools/environ_docs.py

def _infer_algorithm(algo_suffix: str, entry_value: object, library: str) -> str:
    if not algo_suffix:
        if library == "rl_games" and isinstance(entry_value, str) and "vision" in entry_value.lower():
            return "VISION"
        return "PPO"

Tasks using LSTM or FF-specific configs (e.g., Isaac-Repose-Cube-Shadow-OpenAI-FF-Direct-v0 which previously listed rl_games (FF)) now show rl_games (PPO) because the algorithm suffix is empty and the entry-point string does not contain "vision". Similarly, Isaac-Repose-Cube-Shadow-OpenAI-LSTM-Direct-v0 previously listed rl_games (LSTM).

Suggestion: Extend the heuristic to detect "lstm" and "ff" in entry_value strings, or introduce a manual override map similar to RL_LIBRARY_OVERRIDES.


Finding 3: _domain_presets_for_docs Filtering Logic

Severity: Low | tools/environ_docs.py

The function filters domain presets that duplicate physics/renderer names, which is sensible. However, this means if a task has domain presets named identically to physics backends (but with different semantics), they would be silently omitted. The test test_format_presets_rst_hides_domain_names_duplicated_by_physics validates this is intentional, but a code comment explaining the rationale would help future maintainers.


Finding 4: Deleted pip_extras_note.rst Without Migration Note

Severity: Low | docs/source/setup/installation/include/pip_extras_note.rst

The old note explaining that [all] extras were needed for training scripts is deleted. The new documentation explains [kitless] and [isaacsim,all] well, but users who relied on the [rl,tasks] extras pattern from external links/bookmarks will get 404s. Consider adding a brief mention in the changelog or migration section.


Finding 5: rl_games Excluded from [kitless] and [all] Extras

Severity: Low | tools/wheel_builder/res/python_packages.toml

Both all and kitless extras have a commented-out rl-games entry with a TODO note about Python 3.11+ support. The pip installation docs correctly document this and direct users to install the fork manually. This is fine, but the TODO should track which upstream issue to watch.


Finding 6: exclude_patterns in conf.py Now Hides include/*

Severity: Low | docs/conf.py

"source/setup/installation/include/*",

This ensures include fragments are not built as standalone pages, which is correct. However, if a new fragment is added to include/ and the developer forgets to use .. include::, it will silently vanish from the build rather than raising an error.


Finding 7: Hardcoded Isaac Sim Version in Directives

Severity: Low | docs/_extensions/isaaclab_docs.py

The _quickstart_isaacsim function hardcodes isaacsim[all,extscache]==6.0.0 and torch==2.10.0. When Isaac Sim 6.1 releases, these will need manual updates. Consider extracting version pins to conf.py config values (similar to isaaclab_latest_branch) for single-source-of-truth versioning.


Summary

Category Count
Strengths noted 5
Medium severity 1
Low severity 6

Overall this is a well-structured documentation infrastructure PR that significantly reduces maintenance burden. The primary actionable item is the algorithm label precision loss (Finding 2) — it causes a regression in information accuracy for ~2-3 environment entries in the generated table compared to the previous hand-maintained version. The remaining findings are minor improvements for future maintainability.

CI checks are currently pending on the latest push.

Update (commit 3a75af7): Reviewed incremental changes since 7f50812.

Previous findings status:

  • ✅ Finding 3 (_domain_presets_for_docs filtering logic): Addressed — new _PHYSICS_BACKEND_MIRROR_NAMES frozenset makes the filtering explicit with clear documentation, and _physics_names_for_docs adds implicit PhysX detection. Well-tested with 3 new test cases.
  • ✅ Inline comment on isaaclab_docs.py:145 (Windows missing uv install): Partially addressed — both Windows snippets now include a :: Install uv: comment with a link to the uv installation docs. This is a batch comment (not executable), but it clearly guides users to install uv first.
  • Remaining findings (1, 2, 4–7 and inline comments on lines 103, 18, 245) were not addressed in this push — original comments still stand.

New changes reviewed (no new issues found):

  • _infer_implicit_physics_names() correctly detects implicit PhysX from default = PhysxCfg(...) fields
  • _physics_names_for_docs() integration into collect_environment_doc_rows is clean
  • Environment table updates in environments.rst (adding (direct only) qualifiers, newton_mjwarp for Digit, removing stale presets= entries) look accurate
  • New tests provide good coverage of the preset filtering edge cases

Update (commit 2b8740e): Formatting-only changes. No new issues.

Changes reviewed:

  • Import reordering in tools/environ_docs.py and tools/test/test_environ_docs.py
  • Refactored try/except to contextlib.suppress() pattern
  • Line wrapping adjustments

All previous findings remain unchanged — see above.

Update (commit 8e69441): Reviewed incremental changes since 2b8740e.

Previous findings status:

  • ✅ Finding 5 (rl_games excluded from extras): Fully addressed — rl-games is now included in [all], [kitless], and [rl-games] extras via the Python 3.11+ compatible fork. The manual install note in docs is correctly removed, and the kitless/all descriptions now list RL-Games. Test coverage added in test_wheel_builder_metadata.py.
  • Remaining findings (1, 2, 4, 6, 7 and inline comments on lines 103, 18, 245) were not addressed in this push — original comments still stand.

New changes reviewed (no new issues):

  • Digit environments correctly updated to remove newton_mjwarp physics support (closed-loop articulation incompatibility)
  • New .. note:: with cross-reference anchor known-issues-closed-loop-newton in environments.rst and matching label in issues.rst — clean Sphinx cross-referencing
  • python_packages.toml properly declares transitive dependencies (aiohttp, gym, standard-distutils) alongside the rl-games fork in all three aggregate extras (rl-games, all, kitless)
  • Changelog entry (rl-games-wheel-extra.rst) is well-formatted
  • Test refactor extracting _isaaclab_rl_optional_dependencies() helper is clean; new test_wheel_builder_rl_games_extra_matches_source_package validates consistency

Update (commit 6a30379): Reviewed incremental changes since 8e69441.

Previous findings status:

  • ⚠️ Finding 5 (rl_games in extras): Previously marked as fixed, but this commit intentionally reverts it — rl-games is now commented out from [all] extras with a TODO for when the upstream package supports Python 3.11. Docs correctly direct users to install the fork manually. This is a deliberate simplification, not a regression.
  • kitless extra removed entirely — All references to [kitless] have been removed from docs, tests, and python_packages.toml. The [all] extra now serves the "RL frameworks without Isaac Sim" use case. This is a clean simplification that reduces the install matrix.
  • Remaining findings (1, 2, 4, 6, 7 and inline comments on lines 103, 18, 245) were not addressed in this push — original comments still stand.

New changes reviewed (no new issues):

  • pip_extras_note.rst added as a reusable include — clean 4-line note
  • Docs now describe only two extras (isaacsim and all) — consistent throughout
  • rl_games manual install instructions added with correct fork URL and branch
  • Changelog entry (rl-games-wheel-extra.rst) correctly removed since the feature was reverted
  • CI install test updated from [kitless] to [all] — correct since [all] installs RL frameworks without requiring Isaac Sim
  • Test cleanup in test_wheel_builder_metadata.py removes kitless references and the rl-games test — consistent with the package changes

@kellyguo11
kellyguo11 merged commit 4727a6b into isaac-sim:develop May 31, 2026
37 checks passed
kellyguo11 added a commit that referenced this pull request May 31, 2026
…nvs, shutdown error, mjcf fix (#5888)

# Description

Cherry-pick PRs from develop:

- #5866 
- #5879 
- #5882 
- #5884
- #5889

---------

Signed-off-by: Yize Wang <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: YizeWang <[email protected]>
Co-authored-by: Yize Wang <[email protected]>
ooctipus added a commit that referenced this pull request Sep 9, 2026
#7611)

# Description

The symptoms addressed by #7045 and the now-merged #7532 are real, but
the selection mechanism grew into a parallel configuration system: task
registrations described preset-to-agent relationships, the preset CLI
rediscovered those relationships and rewrote `args.agent`, every backend
had to opt into that mutation, and the documentation browser copied the
same mapping again.

Because #7532 has since merged, this branch also fully removes its live
sentinel, second parse, mutation guard, benchmark wiring, and associated
compatibility tests. Historical compiled changelog entries remain as
release history.

This PR makes the existing preset resolver the only owner of
environment-coupled selection:

```text
presets=resnet18
        |
        v
resolve_task_config(task, <library>_cfg_entry_point)
        |
        +-- environment PresetCfg root -> ResNet18 observations
        |
        `-- agent PresetCfg root       -> feature-policy configuration
```

The Gym registry now selects a library or a genuinely independent
training recipe. A library's canonical entry point owns any agent
variants coupled to environment presets, so the same `presets=`
broadcast selects both roots in one resolution pass.

The final diff is **687 additions / 787 deletions: net -100 lines**.

## Before and after

### 1. Environment-coupled agent variants

#### Before: repeat the pairing, then teach the CLI to translate it

The camera task registered separate raw and feature agent keys, then
repeated their relationship to environment presets in another
dictionary:

```python
_RAW_CAMERA_PRESETS = ("albedo", "depth", "rgb", ...)

gym.register(
    ...,
    kwargs={
        "env_cfg_entry_point": "...:CartpoleCameraEnvCfg",
        "rsl_rl_cfg_entry_point": "...:CartpoleCameraPPORunnerCfg",
        "rsl_rl_feature_cfg_entry_point": "...:CartpoleCameraFeaturePPORunnerCfg",
        "agent_preset_compatibility": {
            "rsl_rl_cfg_entry_point": _RAW_CAMERA_PRESETS,
            "rsl_rl_feature_cfg_entry_point": ("resnet18", "theia_tiny"),
            # The same pairings were repeated for RL Games.
        },
    },
)
```

The showcase tasks amplified this into one registry key per
observation/action-space combination—24 noncanonical SKRL keys across
the two tasks—plus another compatibility map:

```python
"skrl_cfg_entry_point": "...:skrl_box_box_ppo_cfg.yaml",
"skrl_box_box_cfg_entry_point": "...:skrl_box_box_ppo_cfg.yaml",
"skrl_box_discrete_cfg_entry_point": "...:skrl_box_discrete_ppo_cfg.yaml",
"skrl_box_multidiscrete_cfg_entry_point": "...:skrl_box_multidiscrete_ppo_cfg.yaml",
# ... one key for every remaining space combination ...
"agent_preset_compatibility": {
    "skrl_cfg_entry_point": ("box_box",),
    "skrl_box_discrete_cfg_entry_point": ("box_discrete",),
    # ... repeat every pairing again ...
},
```

#### After: the canonical agent entry point is a preset root

The agent package owns the variants directly:

```python
@configclass
class CartpoleCameraPPORunnerPresetsCfg(PresetCfg):
    default = CartpoleCameraPPORunnerCfg()
    resnet18 = CartpoleCameraFeaturePPORunnerCfg()
    theia_tiny = CartpoleCameraFeaturePPORunnerCfg()

gym.register(
    ...,
    kwargs={
        "env_cfg_entry_point": "...:CartpoleCameraEnvCfg",
        "rsl_rl_cfg_entry_point": "...:CartpoleCameraPPORunnerPresetsCfg",
    },
)
```

RL Games uses the same canonical-root shape with `preset(default=...,
resnet18=..., theia_tiny=...)`. The showcase YAML family is likewise
exposed behind its sole canonical key:

```python
def skrl_cfg():
    configs = {
        path.stem.removeprefix("skrl_").removesuffix("_ppo_cfg"): load_yaml(path)
        for path in Path(__file__).parent.glob("skrl_*_ppo_cfg.yaml")
    }
    return preset(default=configs.pop("box_box"), **configs)

# Gym registration
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_cfg"
```

The configurations remain, but the 26 preset-specific agent keys, three
compatibility maps, and duplicate preset-name lists do not.

### 2. Preset CLI ownership

#### Before: parse, rediscover task metadata, and mutate another
subsystem's argument

```python
def setup_preset_cli(parser, argv=None, *, agent_library=None):
    ...
    args, remaining = parser.parse_known_args(args_to_parse)
    if agent_library and task_name:
        _auto_select_agent(args, task_name, agent_library, args_to_parse)
    return args, remaining

# Every caller had to opt into the second selector.
args, remaining = setup_preset_cli(parser, agent_library="rsl_rl")
```

`_auto_select_agent` scanned raw `presets=` tokens, intersected them
with the compatibility maps, selected a different registry key, and
rewrote `args.agent`. #7532 later added a sentinel and a second argparse
pass just to decide whether that mutation was allowed to override a
parser default.

#### After: parse preset syntax and return it unchanged

```python
def setup_preset_cli(parser, argv=None):
    ...
    return parser.parse_known_args(args_to_parse)

args, remaining = setup_preset_cli(parser)
```

The preset CLI is again bounded to preset help and parsing. Agent
configuration selection happens once, inside config resolution.

### 3. Humanoid AMP and SKRL algorithm identity

#### Before: infer both the config and algorithm from CLI/key spelling

```python
# Humanoid AMP registered no canonical SKRL key.
"skrl_amp_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml"

# SKRL defaulted to PPO and reconstructed meaning from registry-key text.
parser.add_argument("--algorithm", default="PPO", ...)
agent_cfg_entry_point = (
    "skrl_cfg_entry_point"
    if args_cli.algorithm.lower() == "ppo"
    else f"skrl_{args_cli.algorithm.lower()}_cfg_entry_point"
)
algorithm = agent_cfg_entry_point.split("_cfg")[0].split("skrl_")[-1].lower()
```

A plain Humanoid AMP command therefore looked for the missing
`skrl_cfg_entry_point`. #7045 compensated with a second CLI rule: if the
canonical key was absent and exactly one other key existed, mutate
`args.agent` to that key. The same key-parsing pattern also mislabeled
showcase keys such as `skrl_box_discrete_cfg_entry_point` as algorithms.

#### After: the task owns its default; the resolved config owns its
algorithm

```python
# Humanoid AMP registration
"default_agent": "skrl",
"skrl_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml",
"skrl_amp_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml",  # explicit --algorithm AMP

agent_cfg_entry_point = resolve_skrl_agent_cfg_entry_point(args_cli.agent, args_cli.algorithm)
env_cfg, agent_cfg = resolve_task_config(args_cli.task, agent_cfg_entry_point)
algorithm = resolve_skrl_algorithm(agent_cfg, args_cli.algorithm)  # reads agent.class
```

Omitting `--algorithm` now means “use the task's canonical SKRL config,”
not “assume PPO.” An explicit `--algorithm` still selects an independent
algorithm recipe and is checked against the resolved `agent.class`.
Train, play, benchmarks, and LEAPP all use the same rule.

### 4. Downstream consumers

| Surface | Before | After |
| --- | --- | --- |
| CLI help | `_AgentDescriptionBuilder` and `_enumerate_agents` loaded
Gym metadata and rendered compatibility pairings. | Preset help
describes selectable presets; agent selection is not duplicated in the
preset CLI. |
| Environment browser | Every generated row carried
`agentPresetCompatibility`; JavaScript searched it and injected
`--agent` into commands. | The row field and JavaScript rewrite are
gone; generated commands pass `presets=` directly. |
| Environment catalog | Treated arbitrary agent-key suffixes as
algorithms, displaying recipe names such as `FEATURE` or `BOX_DISCRETE`.
| Recognizes only explicit algorithm aliases, ignores preset/recipe
suffixes, and deduplicates canonical aliases of the same config. |
| Ray Cartpole vision jobs | Set both
`--agent=rl_games_feature_cfg_entry_point` and
`presets=resnet18/theia_tiny`. | Set only the preset. |
| Missing-config diagnostics | Split every `*_cfg_entry_point` suffix
into guessed library and algorithm labels. | Lists the exact registered
configuration keys. |
| LEAPP export | The shared parser accepted `agent_library` so the
preset CLI could mutate `args.agent`; SKRL then reconstructed the
algorithm from that key. | Uses the plain preset parser and derives SKRL
identity from the resolved `agent.class`. |
| Generated project defaults | Emitted the canonical
`<library>_cfg_entry_point` only for PPO, so non-PPO and all multi-agent
projects depended on CLI fallback. | Filters selected algorithms per
workflow and marks PPO, MAPPO, or the sole selected non-PPO recipe
canonical; the documented command resolves directly. |
| Regression tests | Preserved compatibility dictionaries and asserted
an intermediate rewritten `args.agent` value. | Assert the resolved
environment and agent configs, exact canonical registrations/minimal
variants, and absence of the rejected maps/helpers. |

### 5. Commands

Before, users either had to provide both coupled selectors explicitly or
rely on the preset CLI to synthesize the `--agent` half:

```bash
# Before: two names for one camera-feature choice
uv run isaaclab train --rl_library rsl_rl \
    --task Isaac-Cartpole-Camera \
    --agent rsl_rl_feature_cfg_entry_point presets=resnet18

# After: one preset is composed into both roots
uv run isaaclab train --rl_library rsl_rl \
    --task Isaac-Cartpole-Camera presets=resnet18
```

The same simplification applies to RL Games and the showcase space
matrix:

```bash
# Before
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Cartpole-Showcase-Direct \
    --agent skrl_box_discrete_cfg_entry_point presets=box_discrete

# After
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Cartpole-Showcase-Direct presets=box_discrete
```

Humanoid AMP no longer depends on an algorithm flag or the sole-entry
fallback:

```bash
# Before, without relying on CLI auto-selection
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Humanoid-AMP-Walk-Direct --algorithm AMP

# After: the canonical task config is AMP
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Humanoid-AMP-Walk-Direct
```

`--algorithm AMP` remains valid when an explicit algorithm selection is
desired. Generated multi-agent projects likewise use MAPPO as their
canonical SKRL config, so their documented command needs no fallback:

```bash
uv run isaaclab train --rl_library skrl --task <GENERATED-MARL-TASK>
```

## Exact lineage of the removed mechanism

The structure removed or superseded here accumulated across several PRs:

| Change | Mechanism introduced | Disposition in this PR |
| --- | --- | --- |
| #2713 | Made missing-config errors split every agent entry-point key
into inferred library and algorithm labels. | Errors now report the
exact registered keys instead of inventing semantics for their suffixes.
|
| #5605 | Added the 24 space-specific showcase SKRL keys and the
RL-Games camera feature key while consolidating preset-driven Cartpole
tasks. | Keeps those configurations under canonical agent preset roots
and removes their preset-specific registry keys. |
| #5879 | Made the generated environment catalog infer algorithm labels
from arbitrary entry-point suffixes and, for RL-Games vision, from the
config path. | Catalog generation recognizes only the known algorithm
aliases and ignores preset/recipe suffixes. |
| #5904 | Added Ray camera-feature jobs that specified both
`--agent=rl_games_feature_cfg_entry_point` and
`presets=resnet18/theia_tiny`. | Ray selects each feature pipeline with
the preset alone. |
| #5930 | Added the separate `rsl_rl_feature_cfg_entry_point` for
pretrained camera features. | The canonical RSL-RL root owns its raw and
feature-policy variants. |
| #6553 and #6564 | Made SKRL train/play and benchmark entry points
default `--algorithm` to PPO, select a registry key from that default,
and reconstruct algorithm identity from explicit key suffixes. | An
omitted algorithm resolves the task's canonical config first; the
resolved `agent.class` is authoritative everywhere. |
| #6677 | Added three `agent_preset_compatibility` maps, duplicate
`_SPACE_PRESETS` / `_RAW_CAMERA_PRESETS` lists, `setup_preset_cli(...,
agent_library=...)`, `_AgentDescriptionBuilder`, `_enumerate_agents`,
and `agent_library=` plumbing in all eight unified RL train/play entry
points. It also added help, docs, and tests around those pairings. |
Deletes the maps, duplicate lists, agent-aware preset CLI API/helpers,
call-site plumbing, and preservation tests. |
| #6779 | Extended `agent_library` into the shared LEAPP export parser
and added another SKRL helper that inferred the algorithm from the agent
key. | Removes that parser parameter/helper and resolves algorithm
identity from the loaded config. |
| #7045 | Promoted the compatibility metadata from help text into
runtime control with `_auto_select_agent`, raw `presets=` scanning,
declared-domain filtering, preset-to-key matching, post-parse
`args.agent` mutation, and a sole-noncanonical-agent fallback for
Humanoid AMP. It also wired the two SKRL benchmark entry points. |
Deletes both selection rules and their benchmark wiring. Presets compose
the environment and agent roots directly; AMP is registered canonically.
|
| #7160 | Copied `agent_preset_compatibility` into the generated
environment-browser row schema and used it in JavaScript to inject a
preset-specific `--agent` into generated commands. | Removes the
compatibility column and browser-side command rewrite. |
| #7532 (merged) | Added `_AGENT_UNSET`, a second argparse pass in
`_agent_passed_explicitly`, a looser mutation guard, six
RSL-RL/RL-Games/SB3 benchmark train/play wirings, and tests for
rewritten `args.agent` values and explicit-flag spellings. | Fully
reverts its live implementation: there is no agent-key mutation to
guard, no backend-specific preset-CLI wiring to propagate, and no
preservation test for that removed behavior. |

This is therefore more than an alternative fix for two symptoms: it
removes the parallel preset-to-agent selection system end to end.

## Intentional compatibility removal

No warning-only or no-op compatibility shim is retained for:

- `agent_preset_compatibility`
- preset-specific agent keys such as `rsl_rl_feature_cfg_entry_point`
and the showcase space-specific SKRL keys
- `setup_preset_cli(..., agent_library=...)`

The separately named `pretrained_checkpoint_preset_compatibility`
metadata from #7630 is intentionally retained: it declares which
preset-specific checkpoint artifacts exist and never selects an agent
entry point.

Keeping those aliases would preserve the duplicate ownership this
refactor removes. Commands using a preset-specific key should remove
`--agent=<preset-specific-key>` and use the canonical library selection
plus `presets=<name>`, as shown above.

Older SKRL runs may have encoded a configuration-key suffix such as
`box_discrete` as the algorithm in a run directory or manifest. The
corrected identity is the resolved `agent.class` (`PPO` in that
example), so automatic `latest` / `best` discovery cannot safely match
those historical runs. Pass their checkpoint path explicitly.

## Type of change

- Bug fix
- Architecture refactor
- Intentional removal of recently introduced compatibility APIs
- Documentation update

## Validation

The four-case composition regression was also run against an untouched
`develop` worktree. All four cases failed there because the environment
preset changed while the canonical agent stayed at its default; all four
pass on this branch.

- Preset composition, CLI, RL entrypoint, generator, and benchmark
adapter/API tests: **148 passed**
- Pretrained-checkpoint metadata tests: **12 passed**
- Environment documentation tests: **35 passed**
- LEAPP selector/checkpoint tests: **11 passed, 1 skipped**
- Environment browser generation: up to date for **137** training
environments
- JavaScript syntax, pre-commit hooks for all PR files, changelog
validation against current `upstream/develop`, centralized structure
audit, and `git diff --check`: passed

No GPU simulation or full training job was run; the regression is
exercised at configuration composition and entrypoint boundaries before
environment construction.

The generated environment-browser refresh also incorporates the current
physics selectors for the two DrLegs rows.

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run --frozen isaaclab
-f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove the fix is effective
- [x] I have added changelog fragments for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant