Skip to content

clearer error message for physics selector error. - #8610

Merged
kellyguo11 merged 4 commits into
isaac-sim:developfrom
frlai:frlai/improve-physics-selector-error
Oct 15, 2026
Merged

kellyguo11 merged 4 commits into
isaac-sim:developfrom
frlai:frlai/improve-physics-selector-error

Conversation

@frlai

@frlai frlai commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Improves task-registration errors when a typed backend selector, such as physics=isaacsim_physx, is passed to a task that does not expose selectable backend presets. Instead of reporting an unknown preset with an empty availability list, Isaac Lab now explains that the task uses its registered default and instructs the user to remove the selector. Because the validation lives in the shared task configuration resolver, the improved message applies consistently to export, play, train, and other entry points.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to any test changes
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (.skip: tests and CI only)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Oct 15, 2026
@frlai frlai changed the title Improve unsupported backend selector errors clearer error message for physics selector error. Oct 15, 2026
@frlai
frlai marked this pull request as ready for review October 15, 2026 18:34
@frlai
frlai requested a review from a team October 15, 2026 18:34
@frlai

frlai commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

run-ci

@frlai
frlai enabled auto-merge (squash) October 15, 2026 18:34
@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 Oct 15, 2026
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Improves errors for typed backend selectors on tasks without selectable backend presets.

  • Tasks without selectable backends tell callers to use the registered default.

Reviews (1) · Last reviewed commit: "Improve unsupported backend selector err..." · Reviewed by 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

Needs attention: Design and architecture (1), Implementation (1). Other reviewed categories look good.

  • PR description: The body labels this a feature while the .fixed.rst fragment describes a bug fix; align the classification and report the focused pytest command and result.
  • Design and architecture: Typed-selector availability now has two validation paths with divergent diagnostics; move the new explanation into the existing missing check that owns unmatched typed selectors.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: The next(...) scan reports only one unavailable target, forcing repeated runs when both physics and renderer selectors are invalid; collect and report all unmatched typed selectors together.
  • Style consistency: Style consistency looks good.
  • Test quality: Test quality looks good.

Minor fixes needed. Posted 2 inline findings.

Automated review; human maintainers own approval decisions.

known_names = {name for fields in available.values() for name in fields}
unknown = {_normalize_preset_name(name, known_names) for name in unknown_presets} - known_names
if unknown:
unavailable_target = next(

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 · Design Architecture — Typed-selector check placed in wrong branch

Inside the unknown-name branch, this raise hides other unknown presets and the available-preset table, and never fires when the selector name matches another field's preset. Fold it into the typed-selector check below.

unavailable_target = next(
(
target
for target in requested_targets

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 · Implementation — Only first unavailable selector reported

next(...) names one target, so a run passing both physics= and renderer= selectors on a defaults-only task must fail twice. Collect all unavailable targets and list every selector in one error.

@kellyguo11

Copy link
Copy Markdown
Contributor

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 Oct 15, 2026
@kellyguo11 kellyguo11 mentioned this pull request Oct 15, 2026
7 tasks done
@kellyguo11

Copy link
Copy Markdown
Contributor

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 Oct 15, 2026
kellyguo11 added a commit that referenced this pull request Oct 15, 2026
## Description

Backports #8610 to `release/3.0.0`.

Typed backend selectors on tasks without selectable presets now reach
the existing typed-selector validator instead of producing a generic
unknown-preset error with an empty availability list. The validator
reports every unmatched `physics=` and `renderer=` selector together and
tells the user to remove them to use the task's registered defaults.

The release branch already owns this validation in
`_validate_typed_presets`, so this is a semantic adaptation of source PR
head `5a18d8ba9` rather than a literal cherry-pick.

## Type of change

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

## Validation

- Python syntax compilation for the changed source and test files —
passed
- Ruff formatting and lint checks for the changed Python files — passed
- Changelog fragment gate against `upstream/release/3.0.0` — passed
- `git diff --check` — passed
- Focused pytest coverage is delegated to Linux CI because the
repository lockfile excludes the local macOS host

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the locally available formatting and lint checks
- [x] No documentation change is needed for this diagnostic-only fix
- [x] My changes generate no new warnings
- [x] I have applied the test-audit criteria to the regression test
- [x] I have added an `isaaclab_tasks` changelog fragment
- [x] The contributors already exist in `CONTRIBUTORS.md`
@kellyguo11
kellyguo11 disabled auto-merge October 15, 2026 22:53
@kellyguo11
kellyguo11 merged commit edd84df into isaac-sim:develop Oct 15, 2026
123 of 125 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants