Skip to content

Resolve check_instanceable asset input through retrieve_file_path - #7635

Closed
klakhi wants to merge 1 commit into
isaac-sim:release/3.0.0from
klakhi:fix/check-instanceable-remote-asset-path
Closed

klakhi wants to merge 1 commit into
isaac-sim:release/3.0.0from
klakhi:fix/check-instanceable-remote-asset-path

Conversation

@klakhi

@klakhi klakhi commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

scripts/tools/check_instanceable.py accepts a Nucleus/HTTPS asset URL at validation and then
corrupts it before use, so no remote asset can be loaded.

  • Line 82 — check_file_path(args_cli.input) returns 2 ("exists on the Nucleus Server"), so
    validation passes.
  • Line 103 — os.path.abspath(args_cli.input) was applied unconditionally. On Windows this
    prepends the working directory and flips separators, turning the URL into a nonsense local path.

The script therefore contradicted itself: it validated remote paths as supported, then handled them
as if they were local. Because Isaac Lab robot assets live on the asset server (for example
ANT_CFG in isaaclab_assets/robots/ant.py:22 points at
{ISAAC_NUCLEUS_DIR}/Robots/IsaacSim/Ant/ant_instanceable.usd), the tool could not profile the
assets it exists to profile without a manual download first.

Repro before this change:

uv run python scripts/tools/check_instanceable.py \
  https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/6.1/Isaac/Robots/IsaacSim/Ant/ant_instanceable.usd \
  -n 4096 --physics
FileNotFoundError: Unable to open the usd file at path:
C:\Users\horde\IsaacLab\https:\omniverse-content-production.s3-us-west-2.amazonaws.com\Assets\Isaac\6.1\Isaac\Robots\IsaacSim\Ant\ant_instanceable.usd

The input is now resolved through retrieve_file_path() from isaaclab.utils.assets, which is
purpose-built for this local-or-remote case: it returns os.path.abspath(path) for a local file
(identical to the previous behavior, so local inputs are unaffected) and downloads a Nucleus
file — along with its USD references, payloads and MDL textures — before returning a usable local
path. Existing precedent for the same pattern: scripts/reinforcement_learning/leapp/rl_games/export.py:205
and .../sb3/export.py:248.

The existing check_file_path() guard is deliberately left in place so the ValueError: Invalid file path: ... message for a genuinely missing asset is preserved rather than becoming a
FileNotFoundError.

import os is removed because that call site was its only remaining use.

This PR also corrects the module docstring, which told users to run the script from
source/tools/check_instanceable.py — a directory that does not exist in the repository. All four
documented example commands failed if copy-pasted.

Fixes # (issue)

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

N/A — command-line tool; the before/after traceback is shown above.

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Notes on tests and changelog

Tests. No unit test is added. check_instanceable.py calls AppLauncher at module scope
(lines 61-62), so the module cannot be imported in a unit test without launching Isaac Sim — which
is why the script has no existing test. The change delegates to retrieve_file_path(), which is
already covered in source/isaaclab/test/utils/test_assets.py, including remote-URL handling
(test_retrieve_file_path_serializes_cold_cache_population). Happy to add an end-to-end test if a
maintainer prefers one.

Changelog. No fragment is included: tools/changelog/cli.py scopes fragment requirements to
packages under source/, and this change touches only scripts/.

@klakhi
klakhi requested a review from a team September 8, 2026 09:40
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team 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 change replaces unconditional absolute-path conversion at the USD consumption point with the existing local-or-remote asset resolver, addressing the mismatch where remote inputs passed validation but were then treated as local paths. The documented script paths are also corrected.

  • Design and architecture: Asset resolution remains centralized in isaaclab.utils.assets: check_file_path() retains the existing validation and error path, while retrieve_file_path() supplies a usable path to sim_utils.create_prim(). This is a focused change at the single affected consumer.
  • API: The CLI arguments and error contract are unchanged. The accepted input surface now consistently supports the remote paths already recognized by validation, while the documentation examples point to the script's actual repository location.
  • Implementation: The obsolete os import is removed with its only call site. Resolution occurs before the profiling timer, so remote retrieval does not distort the reported clone and setup timings; first use of an uncached remote asset may still add expected pre-profiling latency.

No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.

Automated review; human maintainers own approval decisions.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes remote asset handling in the instanceability-checking tool and corrects its documented invocation path.

  • Resolves validated local, Nucleus, and HTTPS inputs through retrieve_file_path before creating the USD prim.
  • Preserves the existing early invalid-path error and local absolute-path behavior.
  • Updates all usage examples from the nonexistent source/tools path to scripts/tools.

Confidence Score: 5/5

The PR appears safe to merge, with the changed path-resolution flow matching existing asset utilities and callers.

No actionable failures remain; local inputs retain their previous absolute-path behavior, while supported remote inputs are now downloaded and passed to USD loading through the established retrieval utility.

Important Files Changed

Filename Overview
scripts/tools/check_instanceable.py Correctly resolves remote assets to local paths before USD loading while preserving local-path behavior and fixing command examples.

Reviews (1): Last reviewed commit: "Resolve check_instanceable asset input t..." | Re-trigger Greptile

@kellyguo11
kellyguo11 changed the base branch from develop to release/3.0.0 September 8, 2026 17:09
@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 Sep 9, 2026
kellyguo11 added a commit that referenced this pull request Sep 9, 2026
)

# Description

Port of #7635 to `develop`. The original commit and Krishna Lakhi's
authorship are preserved.

`scripts/tools/check_instanceable.py` accepts a Nucleus/HTTPS asset URL
during validation, but then unconditionally applies `os.path.abspath()`
before use. On Windows this prepends the working directory and changes
separators, corrupting the URL into an unusable local path.

The input is now resolved through `retrieve_file_path()` from
`isaaclab.utils.assets`, which supports both local and remote paths.
Local inputs keep the prior absolute-path behavior, while remote assets
and their USD/MDL dependencies are downloaded before the script opens
them. The module docstring's example commands are also corrected from
the nonexistent `source/tools/` path to `scripts/tools/`.

The active-release counterpart is #7635.

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

Already represented by #7635 for `release/3.0.0`.

## Screenshots

N/A — command-line tool.

## Checklist

Docker and GPU tests run on demand. Push the commits you want tested,
then
comment `run-ci` on the pull request.

- [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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

### Validation

- `uv run --extra test python -m pytest -q
source/isaaclab/test/utils/test_assets.py::test_retrieve_file_path_serializes_cold_cache_population`
— passed
- `uv run python -m py_compile scripts/tools/check_instanceable.py` —
passed
- `uv run isaaclab -f` — passed

No new test is added because this script launches `AppLauncher` at
module scope and cannot be imported as a unit without starting Isaac
Sim. The delegated remote-path behavior is covered by the existing
`retrieve_file_path()` unit test above. No changelog fragment is
required because this change touches only `scripts/`, not a source
package.

Co-authored-by: Krishna Lakhi <[email protected]>
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 9, 2026
)

# Description

Port of #7635 to `develop`. The original commit and Krishna Lakhi's
authorship are preserved.

`scripts/tools/check_instanceable.py` accepts a Nucleus/HTTPS asset URL
during validation, but then unconditionally applies `os.path.abspath()`
before use. On Windows this prepends the working directory and changes
separators, corrupting the URL into an unusable local path.

The input is now resolved through `retrieve_file_path()` from
`isaaclab.utils.assets`, which supports both local and remote paths.
Local inputs keep the prior absolute-path behavior, while remote assets
and their USD/MDL dependencies are downloaded before the script opens
them. The module docstring's example commands are also corrected from
the nonexistent `source/tools/` path to `scripts/tools/`.

The active-release counterpart is #7635.

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

Already represented by #7635 for `release/3.0.0`.

## Screenshots

N/A — command-line tool.

## Checklist

Docker and GPU tests run on demand. Push the commits you want tested,
then
comment `run-ci` on the pull request.

- [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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

### Validation

- `uv run --extra test python -m pytest -q
source/isaaclab/test/utils/test_assets.py::test_retrieve_file_path_serializes_cold_cache_population`
— passed
- `uv run python -m py_compile scripts/tools/check_instanceable.py` —
passed
- `uv run isaaclab -f` — passed

No new test is added because this script launches `AppLauncher` at
module scope and cannot be imported as a unit without starting Isaac
Sim. The delegated remote-path behavior is covered by the existing
`retrieve_file_path()` unit test above. No changelog fragment is
required because this change touches only `scripts/`, not a source
package.

Co-authored-by: Krishna Lakhi <[email protected]>

(cherry picked from commit c588458)
@kellyguo11

Copy link
Copy Markdown
Contributor

merged and cherry picked in #7648

@kellyguo11 kellyguo11 closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants