Repository navigation
[Tasks] Fix pretrained checkpoint lookup for domain presets - #7594
Conversation
Greptile SummaryThis 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.
Confidence Score: 4/5The 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
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
Reviews (1): Last reviewed commit: "Resolve pretrained checkpoints by preset" | Re-trigger Greptile |
There was a problem hiding this comment.
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.argvbefore 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_checkpointstill documents omission of both backends as selecting the legacy layout. Withpresets=<non-default>insys.argv, that documented call now raisesValueErrorinstead 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.
kellyguo11
left a comment
There was a problem hiding this comment.
do we need to update the checkpoint files to include the presets in the file names?
|
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) |
…heckpoint-presets # Conflicts: # docs/source/_static/css/environment-browser.js # tools/environ_docs.py
|
run-ci |
…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]>
# 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`
# 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)
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.
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:
No new dependencies.
Type of change
Release backport
Screenshots
Not applicable; the UI change disables the existing pretrained-checkpoint checkbox for unsupported preset selections.
Validation
Checklist