Skip to content

[Tasks] Fix pretrained checkpoint lookup for domain presets - #7594

Merged
kellyguo11 merged 6 commits into
isaac-sim:developfrom
StafaH:fix/pretrained-checkpoint-presets
Sep 8, 2026
Merged

kellyguo11 merged 6 commits into
isaac-sim:developfrom
StafaH:fix/pretrained-checkpoint-presets

Conversation

@StafaH

@StafaH StafaH commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Description

Published checkpoint lookup included the task, physics backend, renderer backend, and RL library, but ignored domain presets. As a result, a depth policy could not be found and an unsuffixed RGB policy could be selected for an incompatible preset.

This change:

  • adds non-default domain presets to the canonical checkpoint filename;
  • keeps aliases of the default preset, such as RGB, on the existing unsuffixed filename;
  • derives the selection centrally from the existing preset overrides, covering all checkpoint consumers;
  • declares the published Cartpole depth checkpoint and disables the environment-browser pretrained option for undeclared preset selections.

No new dependencies.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Screenshots

Not applicable; the UI change disables the existing pretrained-checkpoint checkbox for unsupported preset selections.

Validation

  • 17 existing/new pretrained-checkpoint tests passed.
  • 28 existing/new environment documentation tests passed.
  • Environment browser generation check passed for 137 registered training environments.
  • Ruff lint and formatting hooks passed on all touched Python files.
  • The repository-wide format command passed every hook except the changelog-fragment comparison, which reports pre-existing develop/base differences in unrelated isaaclab_newton, isaaclab_experimental, isaaclab_tasks, and isaaclab_visualizers files.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the complete pre-commit checks without unrelated base failures
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove the fix is effective
  • I have added a changelog fragment for every touched package
  • My name already exists in CONTRIBUTORS.md

@StafaH
StafaH requested a review from a team September 5, 2026 03:08
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 5, 2026
@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR incorporates non-default domain presets into canonical pretrained-checkpoint identity while preserving unsuffixed names for aliases of the default configuration. It also declares the Cartpole depth checkpoint and uses generated compatibility metadata to disable unsupported pretrained selections in the environment browser.

  • Resolves selected non-default domain presets from existing preset overrides.
  • Adds preset suffixes to backend-aware checkpoint paths.
  • Carries per-library checkpoint compatibility into generated browser data.
  • Preserves default-preset aliases such as RGB on existing unsuffixed paths.
  • Leaves the canonical publishing workflow without domain-preset plumbing.

Confidence Score: 4/5

The lookup and browser changes appear safe to merge, with a non-blocking gap in the supported workflow for publishing preset-specific checkpoints.

Runtime lookup correctly distinguishes non-default domain presets and preserves default aliases, but the repository’s publishing job model cannot convey those presets and therefore cannot generate the new suffixed publication paths.

Files Needing Attention: source/isaaclab_rl/isaaclab_rl/utils/pretrained_checkpoint.py and scripts/tools/train_and_publish_checkpoints.py

Important Files Changed

Filename Overview
source/isaaclab_rl/isaaclab_rl/utils/pretrained_checkpoint.py Adds domain-preset-aware checkpoint naming and automatic lookup selection, but the corresponding publishing workflow cannot yet supply the new identity component.
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/init.py Declares RL-Games depth-checkpoint compatibility for the direct camera Cartpole task.
tools/environ_docs.py Derives default aliases and registered preset-specific checkpoint compatibility for generated browser rows.
docs/source/_static/css/environment-browser.js Consumes generated compatibility metadata and disables pretrained selection for unsupported preset and library combinations.
source/isaaclab_rl/test/test_pretrained_checkpoint.py Covers default-alias filtering and preset-suffixed checkpoint retrieval.
tools/test/test_environ_docs.py Verifies compatibility metadata collection and browser-row serialization.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  O["CLI preset overrides"] --> R["Resolve non-default domain presets"]
  R --> N["Canonical checkpoint filename"]
  B["Physics and renderer backends"] --> N
  L["RL library"] --> N
  N --> F["Fetch published checkpoint"]
  M["Task compatibility metadata"] --> G["Generated environment-browser rows"]
  G --> U["Enable or disable pretrained option"]
  P["Checkpoint publishing workflow"] -. "domain preset not currently conveyed" .-> N
Loading

Reviews (1): Last reviewed commit: "Resolve pretrained checkpoints by preset" | Re-trigger Greptile

@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.

Isaac Lab Review Bot

The preset-aware filename and browser integration are consistent for backend-aware checkpoints, but backend-less legacy lookup now fails when process arguments include a non-default domain preset.

  • Design and architecture: Central preset resolution gives backend-aware checkpoint consumers a consistent filename identity. However, resolving presets implicitly from process-wide sys.argv before determining whether the caller requested the legacy layout couples that compatibility path to unrelated CLI state.
  • API: The new parameters are keyword-only and otherwise backward compatible, but get_published_pretrained_checkpoint still documents omission of both backends as selecting the legacy layout. With presets=<non-default> in sys.argv, that documented call now raises ValueError instead of returning the legacy checkpoint. Preset resolution should occur only for backend-aware lookup.
  • Implementation: Preset suffix construction, publish/fetch paths, cache naming, generated browser metadata, and UI updates on preset or library changes were traced and are internally consistent. The remaining implementation fix is to avoid forwarding implicitly resolved preset names into backend-less legacy filename generation.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

@StafaH StafaH changed the title Fix pretrained checkpoint lookup for domain presets [Tasks] Fix pretrained checkpoint lookup for domain presets Sep 5, 2026
@StafaH StafaH added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Sep 5, 2026

@kellyguo11 kellyguo11 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.

do we need to update the checkpoint files to include the presets in the file names?

@StafaH

StafaH commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

I made it backwards compatible when no preset is there. This covers the case when preset is there (which was already in the checkpoints directory but wasnt getting picked up correctly)

@StafaH

StafaH commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 7, 2026
@kellyguo11
kellyguo11 merged commit 6fd0f1e into isaac-sim:develop Sep 8, 2026
54 checks passed
kellyguo11 added a commit that referenced this pull request Sep 8, 2026
…presets (#7594) (#7631)

# Description

Backports #7594 to `release/3.0.0`.

Published checkpoint lookup included the task, physics backend, renderer
backend, and RL library, but ignored domain presets. This backport adds
non-default domain presets to canonical checkpoint filenames, preserves
unsuffixed names for aliases of the default preset, declares the
published Cartpole depth checkpoint, and disables the
environment-browser pretrained option for undeclared preset selections.

The merged commit cherry-picked cleanly onto the latest `release/3.0.0`.
No new dependencies.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Release backport

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

This PR already targets `release/3.0.0`.

## Screenshots

Not applicable; the UI change disables the existing
pretrained-checkpoint checkbox for unsupported preset selections.

## Validation

- All repository pre-commit hooks passed, including Ruff, formatting,
RST validation, changelog coverage, and Git LFS checks.
- The source PR's Linux CI passed, including the package tests, tools
tests, documentation build, installation tests, and pre-commit checks.
- Simulator-dependent tests could not be rerun locally because this
branch's uv lockfile supports Linux x86_64/aarch64 and Windows AMD64,
but not macOS.

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the repository pre-commit checks
- [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 a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] The original author's name already exists in `CONTRIBUTORS.md`

Co-authored-by: Mustafa H <[email protected]>
kellyguo11 added a commit that referenced this pull request Sep 8, 2026
# Description

Complete preset-aware pretrained checkpoint support for
feature-extractor policies on `Isaac-Cartpole-Camera`.

- Advertise every feature-agent preset supported by the preferred RSL-RL
workflow in the checkpoint publication matrix. The currently registered
feature presets are `resnet18` and `theia_tiny`.
- Flatten arbitrary multi-dimensional frozen image-encoder outputs after
the environment batch dimension. This is a no-op for ResNet18's
already-flat output and converts Theia-Tiny's token output from
`(num_envs, 36, 192)` to the flat observation required by the MLP
policy.
- Validate checkpoint metadata registry-wide: workflows must be
registered, presets must be unique, and every advertised preset must be
a real domain preset.
- Derive the Cartpole coverage assertion from
`agent_preset_compatibility`, so adding a future feature preset without
checkpoint publication metadata fails CI.
- Regenerate the environment browser so supported pretrained feature
presets are visible.

The mechanism is not tied to the two QA commands: #7594 provides generic
preset-aware naming/lookup/publication, while this PR covers arbitrary
feature encoder shapes and future feature-preset registry additions.
Other raw camera/rendering/domain presets remain explicit opt-ins
because each advertised entry requires a compatible trained artifact.

This builds on the agent preset selection fixed by #7532 and the
checkpoint naming/lookup fixed by #7594. Both are merged.

Addresses NVBug 6675381.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Release backport

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

## Screenshots

Not applicable.

## Validation

- Regression test failed on merged `develop`: encoder output remained
`torch.Size([4, 6, 8])` instead of `(4, 48)`.
- `.venv/bin/python -m pytest
scripts/tools/test/test_train_and_publish_checkpoints.py
source/isaaclab/test/envs/test_stacked_image_mdp.py
source/isaaclab_rl/test/test_pretrained_checkpoint.py -q` — 44 passed.
- `UV_FROZEN=1 uv run isaaclab -f` — passed.
- `uv run python tools/changelog/cli.py check develop` — passed.
- `uv run --isolated --extra test -- make -C docs current-docs` —
generated the updated browser and completed all pages, but exited 2
because the local isolated environment reports 44 pre-existing
import/reference warnings as errors (including unavailable `ovstage` and
`isaaclab_ppisp` modules). The PR docs CI is the authoritative
warning-free build.
- ResNet18 and Theia-Tiny RSL-RL policies trained for 1,638,400 steps
each with local Isaac Sim 6.1 and reached mean episode lengths of 222.25
and 177.00, respectively (benchmark threshold: 150).
- Both checkpoints loaded and reached policy playback; Theia-Tiny used
the corrected flattened observation size of 6,912.
- Both default Newton MJWarp/Newton renderer artifacts are present on
the internal Nucleus server under the exact preset-aware filenames:
- `rsl_rl/Isaac-Cartpole-Camera_resnet18_newtonmjwarp_newton_rsl_rl.pt`
— 6,985,267 bytes, SHA-256
`13cbec819675809d6904c57d68a20d7c7d92d283999502509e8fd8da006099f8`
-
`rsl_rl/Isaac-Cartpole-Camera_theia_tiny_newtonmjwarp_newton_rsl_rl.pt`
— 43,450,675 bytes, SHA-256
`9f75a2069bdec9bd06f888b9264da3ad664d3707fa038cf09929045ce5b526c0`

## Artifact coverage

The uploaded pair covers the default Newton MJWarp/Newton renderer
selection. The generic core publication matrix also schedules both
feature presets for these additional supported backend/renderer pairs,
whose artifacts still need to be trained and published for full
cross-backend coverage:

- PhysX / RTX
- PhysX / Newton renderer
- Newton MJWarp / RTX

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run 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 my fix is effective
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 8, 2026
# Description

Complete preset-aware pretrained checkpoint support for
feature-extractor policies on `Isaac-Cartpole-Camera`.

- Advertise every feature-agent preset supported by the preferred RSL-RL
workflow in the checkpoint publication matrix. The currently registered
feature presets are `resnet18` and `theia_tiny`.
- Flatten arbitrary multi-dimensional frozen image-encoder outputs after
the environment batch dimension. This is a no-op for ResNet18's
already-flat output and converts Theia-Tiny's token output from
`(num_envs, 36, 192)` to the flat observation required by the MLP
policy.
- Validate checkpoint metadata registry-wide: workflows must be
registered, presets must be unique, and every advertised preset must be
a real domain preset.
- Derive the Cartpole coverage assertion from
`agent_preset_compatibility`, so adding a future feature preset without
checkpoint publication metadata fails CI.
- Regenerate the environment browser so supported pretrained feature
presets are visible.

The mechanism is not tied to the two QA commands: #7594 provides generic
preset-aware naming/lookup/publication, while this PR covers arbitrary
feature encoder shapes and future feature-preset registry additions.
Other raw camera/rendering/domain presets remain explicit opt-ins
because each advertised entry requires a compatible trained artifact.

This builds on the agent preset selection fixed by #7532 and the
checkpoint naming/lookup fixed by #7594. Both are merged.

Addresses NVBug 6675381.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Release backport

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

## Screenshots

Not applicable.

## Validation

- Regression test failed on merged `develop`: encoder output remained
`torch.Size([4, 6, 8])` instead of `(4, 48)`.
- `.venv/bin/python -m pytest
scripts/tools/test/test_train_and_publish_checkpoints.py
source/isaaclab/test/envs/test_stacked_image_mdp.py
source/isaaclab_rl/test/test_pretrained_checkpoint.py -q` — 44 passed.
- `UV_FROZEN=1 uv run isaaclab -f` — passed.
- `uv run python tools/changelog/cli.py check develop` — passed.
- `uv run --isolated --extra test -- make -C docs current-docs` —
generated the updated browser and completed all pages, but exited 2
because the local isolated environment reports 44 pre-existing
import/reference warnings as errors (including unavailable `ovstage` and
`isaaclab_ppisp` modules). The PR docs CI is the authoritative
warning-free build.
- ResNet18 and Theia-Tiny RSL-RL policies trained for 1,638,400 steps
each with local Isaac Sim 6.1 and reached mean episode lengths of 222.25
and 177.00, respectively (benchmark threshold: 150).
- Both checkpoints loaded and reached policy playback; Theia-Tiny used
the corrected flattened observation size of 6,912.
- Both default Newton MJWarp/Newton renderer artifacts are present on
the internal Nucleus server under the exact preset-aware filenames:
- `rsl_rl/Isaac-Cartpole-Camera_resnet18_newtonmjwarp_newton_rsl_rl.pt`
— 6,985,267 bytes, SHA-256
`13cbec819675809d6904c57d68a20d7c7d92d283999502509e8fd8da006099f8`
-
`rsl_rl/Isaac-Cartpole-Camera_theia_tiny_newtonmjwarp_newton_rsl_rl.pt`
— 43,450,675 bytes, SHA-256
`9f75a2069bdec9bd06f888b9264da3ad664d3707fa038cf09929045ce5b526c0`

## Artifact coverage

The uploaded pair covers the default Newton MJWarp/Newton renderer
selection. The generic core publication matrix also schedules both
feature presets for these additional supported backend/renderer pairs,
whose artifacts still need to be trained and published for full
cross-backend coverage:

- PhysX / RTX
- PhysX / Newton renderer
- Newton MJWarp / RTX

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`uv run 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 my fix is effective
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`

(cherry picked from commit cdaefc5)
hujc7 added a commit to hujc7/IsaacLab that referenced this pull request Sep 9, 2026
A task's extra checkpoints are a property of the task, so it declares
them where its other checkpoint metadata already lives: the gym.register
kwargs that isaac-sim#7594 added preset compatibility to. The publish script and
the fetch read the same declaration by task name, so neither walks a
resolved config and isaaclab gains no public type.

The component keeps its own glob and prefers the published copy beside
the policy, which playback uses as its log directory.
@StafaH
StafaH deleted the fix/pretrained-checkpoint-presets branch September 13, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

2 participants