Repository navigation
[Backport release/3.0.0] Fix pretrained checkpoint lookup for domain presets (#7594) - #7631
Conversation
…m#7594) # 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 - [x] 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 - [x] I have read and understood the contribution guidelines - [ ] I have run the complete pre-commit checks without unrelated base failures - [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 for every touched package - [x] My name already exists in CONTRIBUTORS.md
|
run-ci |
Greptile SummaryThis backport adds domain-preset identity to pretrained checkpoint filenames and propagates it through training, collection, review, publication, lookup, task registration, and the generated environment browser.
Confidence Score: 4/5The PR is not safe to merge until checkpoint identity also handles supported explicit domain-preset selectors such as A supported play command can resolve a non-default depth environment while requesting the unsuffixed default checkpoint because preset discovery only inspects Files Needing Attention: source/isaaclab_rl/isaaclab_rl/utils/pretrained_checkpoint.py Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[CLI preset selection] --> B[Hydra resolves environment]
A --> C[Checkpoint preset discovery]
B --> D[Environment observation contract]
C --> E[Preset-qualified checkpoint name]
E --> F[Published checkpoint]
F --> G[Play workflow]
D --> G
H[Explicit env=depth selector] --> B
H -. consumed before lookup .-> C
Reviews (1): Last reviewed commit: "[Tasks] Fix pretrained checkpoint lookup..." | Re-trigger Greptile |
| for override in sys.argv[1:] if overrides is None else overrides: | ||
| if "=" not in override: | ||
| continue | ||
| key, value = override.split("=", 1) | ||
| if key.lstrip("-") == PresetTarget.DOMAIN.value: | ||
| selected_names.extend(name.strip() for name in value.split(",") if name.strip()) |
There was a problem hiding this comment.
Explicit Presets Lose Identity
env=depth is a supported preset selection for Isaac-Cartpole-Camera-Direct, but Hydra consumes that argument before the play callback and this code only recognizes presets=depth. The environment therefore uses depth observations while lookup requests the unsuffixed default/RGB checkpoint. This can load an incompatible policy or miss the intended depth checkpoint. Derive the preset identity from the resolved configuration or preserve explicit preset selections through checkpoint lookup.
Knowledge Base Used: Learning workflows
|
run-ci |
There was a problem hiding this comment.
Isaac Lab Review Bot
The backport consistently adds domain presets to checkpoint identity across lookup, publishing, job generation, and the environment browser. One API validation gap should be fixed: the new preset_names parameters accept a bare string and silently interpret it as individual characters.
- Design and architecture: Preset identity is threaded consistently alongside physics and renderer identity while preserving legacy unsuffixed checkpoint paths. The generated browser compatibility metadata aligns with the new runtime lookup behavior.
- API: The keyword-only
preset_names: Sequence[str]interface preserves existing callers, but_normalize_pretrained_checkpoint_preset_namesmust reject a barestror treat it as one preset. Currently"depth"becomes("d", "e", "h", "p", "t"), producing a valid-looking but incorrect checkpoint filename and an unavailable-checkpoint result. - Implementation: The preset suffix is propagated through local logs, collection, review, publishing, and fetching, and the browser disables checkpoint selection for undeclared preset/library combinations. Add explicit string handling in the preset-name normalization path and cover it with a focused test.
Minor fixes needed. Posted 1 actionable finding inline.
Automated review; human maintainers own approval decisions.
|
|
||
| def _normalize_pretrained_checkpoint_preset_names(preset_names: Sequence[str]) -> tuple[str, ...]: | ||
| """Return unique, validated checkpoint preset names in canonical order.""" | ||
| normalized = tuple(sorted(set(preset_names))) |
There was a problem hiding this comment.
🟡 Warning · Api — Bare string preset_names silently expands to characters
preset_names is typed Sequence[str], which accepts a plain str. sorted(set("depth")) then yields ('d','e','h','p','t'), all pass the alnum check, and the lookup silently builds ...Task_d_e_h_p_t_physx_..., reporting the checkpoint as unavailable instead of failing. Reject str explicitly (or treat it as one preset) in this new public keyword parameter.
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
Release backport
developThis PR already targets
release/3.0.0.Screenshots
Not applicable; the UI change disables the existing pretrained-checkpoint checkbox for unsupported preset selections.
Validation
Checklist
source/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md