Skip to content

[Backport release/3.0.0] Fix pretrained checkpoint lookup for domain presets (#7594) - #7631

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-7594-release-3.0.0
Sep 8, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
kellyguo11:codex/backport-7594-release-3.0.0

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

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

  • I have read and understood the contribution guidelines
  • I have run the repository pre-commit checks
  • 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 under source/<pkg>/changelog.d/ for every touched package
  • The original author's name already exists in CONTRIBUTORS.md

…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
@kellyguo11
kellyguo11 requested a review from a team September 8, 2026 03:06
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 8, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor 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 8, 2026
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

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

  • Preserves unsuffixed checkpoint names for default-equivalent preset aliases.
  • Declares the Cartpole camera depth checkpoint for RL-Games.
  • Disables browser checkpoint selection for unsupported non-default presets.
  • Leaves one supported explicit preset-selection path disconnected from checkpoint identity.

Confidence Score: 4/5

The PR is not safe to merge until checkpoint identity also handles supported explicit domain-preset selectors such as env=depth.

A supported play command can resolve a non-default depth environment while requesting the unsuffixed default checkpoint because preset discovery only inspects presets= arguments that survive into the callback.

Files Needing Attention: source/isaaclab_rl/isaaclab_rl/utils/pretrained_checkpoint.py

Important Files Changed

Filename Overview
source/isaaclab_rl/isaaclab_rl/utils/pretrained_checkpoint.py Adds preset-qualified checkpoint identities, but only discovers broadcast presets= arguments and misses supported explicit preset selectors.
scripts/tools/train_and_publish_checkpoints.py Propagates preset names consistently through checkpoint job IDs, commands, logs, review state, collection, and publication.
tools/environ_docs.py Generates browser compatibility metadata for default-equivalent and explicitly declared checkpoint presets.
docs/source/_static/css/environment-browser.js Uses generated compatibility metadata to disable unsupported pretrained-checkpoint selections.
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/init.py Declares RL-Games checkpoint availability for the Cartpole camera depth preset.

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
Loading

Reviews (1): Last reviewed commit: "[Tasks] Fix pretrained checkpoint lookup..." | Re-trigger Greptile

Comment on lines +139 to +144
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())

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.

P1 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

@kellyguo11

Copy link
Copy Markdown
Contributor 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 8, 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.

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_names must reject a bare str or 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)))

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.

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

@kellyguo11
kellyguo11 merged commit 834e38f into isaac-sim:release/3.0.0 Sep 8, 2026
56 of 84 checks passed
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.

2 participants