Skip to content

[Backport release/3.0.0] Fix template generator in uv environments (#7480) - #7585

Merged
kellyguo11 merged 1 commit into
isaac-sim:release/3.0.0from
StafaH:codex/backport-7480-release-3.0.0
Sep 5, 2026
Merged

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

Conversation

@StafaH

@StafaH StafaH commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Description

Backports #7480 to release/3.0.0 by cherry-picking merged commit 74839972bd890051f09f9d9535f476d3e532dc27 with -x provenance.

The automatic backport run encountered conflicts in the wheel-metadata regression test and uv.lock, then stopped because the combined conflict context exceeded the resolver limit.

This manual backport preserves the release branch's wheel-builder helpers and installed-wheel compatibility dispatcher while adding the template dependency regression coverage. The lockfile retains the release dependency graph and records only the new direct Jinja2 requirement instead of importing develop's unrelated marker normalization.

Field Commit
Original merged change 74839972bd890051f09f9d9535f476d3e532dc27
Release base used 5c610f076e6e8ba251bd08275d1dbbc3f1353597
Proposed backport 9d0b45f46d089854ee5e487e0931adce63276250

Type of change

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

Release backport

  • This PR already targets the active release branch; do not backport it again.

Validation

  • Repository backport candidate validation passed with every source path preserved and no extra paths changed.
  • uv lock --check passed with the release-specific lockfile resolution.
  • uv run python -m pytest --confcutdir=tools/template tools/template/test_cli.py -q — 7 passed.
  • uv run python -m pytest source/isaaclab/test/cli/test_misc_commands.py source/isaaclab/test/cli/test_wheel_builder_metadata.py -q — 18 passed.
  • uv run python -m pytest source/isaaclab_rl/test/test_template_generator.py -q — 20 passed.
  • uv run isaaclab -f passed.
  • uv run --isolated --extra test -- make -C docs current-docs passed without warnings.
  • git diff --check upstream/release/3.0.0...HEAD passed.

Checklist

  • I have read and understood the contribution guidelines.
  • I have run the pre-commit checks.
  • I have preserved the corresponding documentation changes.
  • My changes generate no new warnings.
  • I have preserved and run the regression tests.
  • The original changelog fragments are preserved for both touched packages.
  • The original contributors already exist in CONTRIBUTORS.md.

The template generator attempted to install its dependencies with
`python -m pip` every time it started. Fresh uv environments do not
include the pip module, so the install failed and the generator then
crashed while importing its prompt dependency.

This change:

- declares Jinja2 in the root dependency metadata so source and wheel
installs provide the renderer
- removes runtime dependency installation from `isaaclab --new`
- replaces InquirerPy with the existing Rich dependency and native
numbered multi-selection validation
- removes the duplicate template requirements file
- makes generated projects use the kit-less Newton backend by default
instead of installing Isaac Sim
- forwards `isaacsim`, `ov`, `ovphysx`, and `ovrtx` as optional extras
in generated projects
- documents backend selection in the generated README
- adds prompt, launcher, generated-metadata, and wheel-metadata
regression coverage

No new prompt dependency is introduced: Jinja2 was already present
transitively, while removing InquirerPy also removes its
otherwise-unused `pfzy` dependency.

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

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

Not applicable.

- `uv run python -m pytest --confcutdir=tools/template
tools/template/test_cli.py -q` (4 passed)
- `uv run python -m pytest
source/isaaclab/test/cli/test_misc_commands.py
source/isaaclab/test/cli/test_wheel_builder_metadata.py -q` (18 passed)
- verified the generated-metadata regression fails against the pre-fix
template because `isaacsim` is a base dependency
- `uv run python tools/changelog/cli.py check develop`
- `uv run isaaclab -f`
- generated an external direct single-agent project with RSL-RL in a
clean uv environment without InquirerPy or pfzy, then compiled its
generated Python and parsed both generated TOML files

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run isaaclab -f`
- [x] I updated the generated project 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 the touched `isaaclab`
package
- [x] My name already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Antoine Richard <[email protected]>
(cherry picked from commit 7483997)
@StafaH
StafaH requested a review from a team September 4, 2026 21:19
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Sep 4, 2026
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This backport removes runtime pip installation from the template command, declares Jinja2 as an Isaac Lab dependency, replaces InquirerPy prompts with Rich, and substantially redesigns generated external projects around a single uv src package.

  • Adds separate project, task-family, and robot naming plus optional Isaac Sim UI-extension generation.
  • Updates generated packaging, task registration, backend extras, tests, documentation, and wheel metadata.
  • Preserves the release branch’s dependency graph while adding the direct Jinja2 lockfile edge.
  • One accepted naming path can generate tasks that are silently excluded from registration.

Confidence Score: 4/5

The PR should not merge until generated task and robot names are prevented from selecting importer-blacklisted packages that leave tasks unregistered.

The new free-form task-family and robot naming permits valid-looking inputs such as mdp and utils, but the generated importer intentionally skips those packages, producing projects whose tasks cannot be discovered; the remaining findings affect generated-test compatibility and deprecated documentation.

Files Needing Attention: tools/template/generator.py, tools/template/templates/external/test_registration, docs/source/developer-tools/template_generator.rst

Important Files Changed

Filename Overview
tools/template/generator.py Adds separate external naming and src-layout generation, but accepts task and robot names that the generated importer will blacklist.
tools/template/cli.py Replaces InquirerPy with Rich prompts and collects the expanded external-project specification.
tools/template/templates/external/pyproject.toml Converts generated projects to a single uv_build package with task entry points, backend extras, and development tooling.
tools/template/templates/external/test_registration Adds generated registration coverage, though keyword project names produce invalid literal import syntax.
docs/source/developer-tools/template_generator.rst Consolidates template-generator guidance but introduces examples using the deprecated Newton visualizer alias.
pyproject.toml Declares Jinja2 directly so the generator no longer needs to mutate its environment at runtime.
source/isaaclab/isaaclab/cli/commands/misc.py Runs the template generator directly instead of invoking pip first.
uv.lock Records the new direct Jinja2 dependency without changing the locked package version.

Reviews (1): Last reviewed commit: "[Workflow] Fix template generator in uv ..." | Re-trigger Greptile

Comment on lines +254 to +255
assert specification["task_name"].isidentifier(), "Task family name must be a valid identifier"
assert specification["robot_name"].isidentifier(), "Robot/config name must be a valid identifier"

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 Blacklisted names skip registration

External task-family and robot names are only checked with isidentifier(), so accepted names such as mdp or utils can be excluded by the generated task importer. For example, selecting mdp as the task-family name creates the package, but import_packages(__name__, ["utils", ".mdp"]) skips it. Its gym.register() call never runs, so the generated task cannot be found.


import gymnasium as gym

import {{ name }}.tasks # noqa: F401

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.

P2 Keywords break generated tests

The project name is rendered directly into an import statement, but the generator accepts Python keywords because str.isidentifier() returns true for names such as class. Such a project gets a syntactically invalid registration test, so the documented uv run pytest workflow fails during test collection. Reject keywords or import the generated package dynamically.


.. code-block:: bash

uv run isaaclab random_agent --task <TASK_NAME> --num_envs 16 --viz newton

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.

P2 Examples use deprecated alias

This first-run example, as well as the play example later in the page, recommends --viz newton. That value is only a deprecated alias and emits a warning; newton_gl is the canonical value. Teaching the canonical option avoids warnings and another documentation migration when the alias is removed.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@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

Reviewed the backport’s removal of runtime pip installation, declaration of Jinja2 in package metadata, Rich-based prompts, generated-project src layout, and consolidated documentation. No numbered candidate findings were supplied for acceptance.

  • Design and architecture: The dependency path is coherent: the CLI now runs the generator directly, Jinja2 is present in root and wheel metadata, and the obsolete template requirements file is removed from CI use. The single-package src layout, task-discovery entry point, and opt-in UI extension are consistently represented across generation and documentation.
  • API: The command_new delegation contract remains intact. Existing programmatic generator inputs retain defaults for task_name, robot_name, and include_ui_extension, while internal task IDs and filenames remain covered. The removed documentation pages’ public reference labels are preserved in the replacement page.
  • Implementation: Traced generated family names, task IDs, environment filenames, entry points, registration tests, and list filtering through the generator and templates. Tests cover direct and manager-based layouts, wheel dependencies, prompt behavior, and passive package imports. Residual validation gaps remain for Python-keyword project names and a task family literally named mdp, but neither was presented as a numbered candidate finding.

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.

@StafaH

StafaH commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator 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 4, 2026
@StafaH StafaH mentioned this pull request Sep 5, 2026
8 tasks done
@kellyguo11
kellyguo11 merged commit e79616e into isaac-sim:release/3.0.0 Sep 5, 2026
80 of 83 checks passed
ooctipus pushed a commit that referenced this pull request Sep 5, 2026
# Description

LEAPP 0.7.0 introduced two regressions in the Isaac Lab export suite
after it was published on September 4:

- Kuka-Allegro export re-enters the graph with `robot_root_link_quat_w`
after registering the aliased tensor as `robot_root_quat_w`.
- SKRL Cartpole export fails while LEAPP reconstructs Warp
`BuiltinCallDesc` tuple subclasses during `wp.rand_init` interception.

The `isaaclab_rl` package-test job installed bare `leapp`, so the new
release entered CI without a repository change. The same failures
appeared in unrelated PRs, including #7585 and #7544.

This change pins both the public `leapp` extra and the package-test
installation to `leapp==0.6.1`. The lockfile now resolves the same
version, keeping project environments and CI aligned until the LEAPP 0.7
regressions are fixed upstream.

## Type of change

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

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable.

## Validation

- `uv lock --check` passed.
- `uv run --extra leapp python -c "..."` resolved and verified LEAPP
0.6.1.
- Focused pre-commit YAML and TOML checks passed.
- `uv run isaaclab -f` passed every formatting, syntax, metadata, and
spelling hook except the changelog-fragment hook. That hook reports four
pre-existing `develop`-base fragment problems in `isaaclab_newton`,
`isaaclab_tasks`, `isaaclab_experimental`, and `isaaclab_visualizers`;
this PR changes no `source/` path.
- `git diff --check upstream/develop` passed.

## Checklist

- [x] I have read and understood the contribution guidelines.
- [x] I have run the pre-commit checks; the unrelated base-branch
changelog failure is documented above.
- [x] Documentation changes are not required for this dependency pin.
- [x] My changes generate no new warnings.
- [x] No test was added; dependency resolution and repository metadata
checks cover this pinning change.
- [x] No changelog fragment is required because no release-managed
package under `source/` changes.
- [x] My name already exists in `CONTRIBUTORS.md`.
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 5, 2026
# Description

LEAPP 0.7.0 introduced two regressions in the Isaac Lab export suite
after it was published on September 4:

- Kuka-Allegro export re-enters the graph with `robot_root_link_quat_w`
after registering the aliased tensor as `robot_root_quat_w`.
- SKRL Cartpole export fails while LEAPP reconstructs Warp
`BuiltinCallDesc` tuple subclasses during `wp.rand_init` interception.

The `isaaclab_rl` package-test job installed bare `leapp`, so the new
release entered CI without a repository change. The same failures
appeared in unrelated PRs, including #7585 and #7544.

This change pins both the public `leapp` extra and the package-test
installation to `leapp==0.6.1`. The lockfile now resolves the same
version, keeping project environments and CI aligned until the LEAPP 0.7
regressions are fixed upstream.

## Type of change

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

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable.

## Validation

- `uv lock --check` passed.
- `uv run --extra leapp python -c "..."` resolved and verified LEAPP
0.6.1.
- Focused pre-commit YAML and TOML checks passed.
- `uv run isaaclab -f` passed every formatting, syntax, metadata, and
spelling hook except the changelog-fragment hook. That hook reports four
pre-existing `develop`-base fragment problems in `isaaclab_newton`,
`isaaclab_tasks`, `isaaclab_experimental`, and `isaaclab_visualizers`;
this PR changes no `source/` path.
- `git diff --check upstream/develop` passed.

## Checklist

- [x] I have read and understood the contribution guidelines.
- [x] I have run the pre-commit checks; the unrelated base-branch
changelog failure is documented above.
- [x] Documentation changes are not required for this dependency pin.
- [x] My changes generate no new warnings.
- [x] No test was added; dependency resolution and repository metadata
checks cover this pinning change.
- [x] No changelog fragment is required because no release-managed
package under `source/` changes.
- [x] My name already exists in `CONTRIBUTORS.md`.

(cherry picked from commit 995d96c)
@StafaH
StafaH deleted the codex/backport-7480-release-3.0.0 branch September 13, 2026 12:10
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