[Workflow] Update project template generator, allow isaaclab CLI to work from pip install - #7307
Conversation
Greptile SummaryThe PR enables installed Isaac Lab workflow dispatch, discovers downstream task packages through Python entry points, and modernizes generated projects as self-contained uv workspaces.
Confidence Score: 4/5The PR should not merge until downstream entry-point failures are isolated so an unrelated broken installed project cannot disable valid Isaac Lab workflows. Every affected workflow now loads all installed downstream task plugins before dispatch, and an exception from any one plugin prevents even independently registered built-in tasks from running. Files Needing Attention: source/isaaclab/isaaclab/cli/init.py Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI as Installed isaaclab CLI
participant Plugins as isaaclab.tasks entry points
participant Runner as isaaclab_rl workflow
participant Registry as Gym task registry
User->>CLI: isaaclab train/play/benchmark
CLI->>Plugins: Load every downstream task package
Plugins->>Registry: Register downstream task IDs
CLI->>Runner: Forward workflow arguments
Runner->>Registry: Resolve requested task
Reviews (1): Last reviewed commit: "Enable downstream workflows and moderniz..." | Re-trigger Greptile |
| for entry_point in importlib.metadata.entry_points(group=_TASK_ENTRY_POINT_GROUP): | ||
| entry_point.load() |
There was a problem hiding this comment.
Broken plugin blocks all workflows
If any installed downstream package has a stale or broken isaaclab.tasks entry point, entry_point.load() propagates its import exception before workflow dispatch, causing even valid built-in benchmark, training, playback, and dummy-agent commands to abort.
Knowledge Base Used: Task library
There was a problem hiding this comment.
Isaac Lab Review Bot
The installed-workflow CLI and uv project-generation changes are internally consistent, but the generated direct multi-agent configuration introduces an inverted balancing reward and exposes several tuning fields that are never consumed.
- Design and architecture: The entry-point-based task discovery and in-process workflow dispatch coherently decouple downstream projects from an Isaac Lab source checkout. However, the generated multi-agent config adds reward and success parameters with no corresponding reward or termination logic, leaving misleading no-op configuration fields.
- API: The
isaaclab.tasksentry-point contract, generated package metadata, wheel CLI delegation, removed project-specific runners, and updated documentation align. No separate API compatibility issue was identified among the candidate findings. - Implementation: The direct multi-agent reward implementation still adds squared angular errors multiplied by configured scales, while the patch changes both position scales from negative to positive, rewarding deviation rather than balancing. The newly added upright, action, angle, and duration fields are not read by the companion environment template and should either be implemented or removed.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| rew_scale_cart_pos = 0.0 | ||
| rew_scale_cart_vel = -0.01 | ||
| rew_scale_pole_pos = -1.0 | ||
| rew_scale_pole_pos = 1.0 |
There was a problem hiding this comment.
🟡 Warning · Implementation — Multi-agent position reward scales inverted
compute_rewards in the companion env template is unchanged and adds rew_scale_pole_pos * sum(square(pole_pos)) and rew_scale_pendulum_pos * sum(square(pole_pos + pendulum_pos)) to the agent rewards. Flipping these scales from -1.0 to 1.0 (lines 87 and 89) rewards angular deviation instead of penalizing it, so every generated multi-agent project trains toward falling over. The single-agent template still uses -1.0 with the same formula. Restore the negative scales.
| rew_scale_pendulum_pos = -1.0 | ||
| rew_scale_pendulum_pos = 1.0 | ||
| rew_scale_pendulum_vel = -0.01 | ||
| rew_scale_upright = 1.0 |
There was a problem hiding this comment.
🔵 Suggestion · Design Architecture — Generated config exposes inert tuning fields
rew_scale_upright, rew_scale_action, success_upright_angle, and success_duration_s are added here, but the generated env template never reads them: _get_rewards passes a fixed argument list to compute_rewards, and _get_dones uses only max_cart_pos and the episode length. Every generated project ships tunable knobs that silently do nothing. Wire them into the reward/termination logic or drop them.
Description
Enable downstream projects installed from the Isaac Lab package to use the unified
uv run isaaclabworkflow commands without an Isaac Lab source checkout. Installed downstream task packages are discovered through theisaaclab.tasksentry-point group before workflow dispatch.Modernize the project generator for Isaac Lab 3.0 by generating a self-contained uv workspace, package metadata and task-discovery entry points, uv-first documentation and VS Code launches, current preset-based physics configs, and ProxyArray/indexed write APIs. The wheel now bundles the generator resources required by
isaaclab --new.Type of change
Screenshots
Not applicable.
Validation
uv run --frozen python -m pytest source/isaaclab/test/cli/test_installed_workflow_entrypoints.py source/isaaclab/test/cli/test_benchmark_entrypoint.py source/isaaclab/test/cli/test_wheel_builder_metadata.py source/isaaclab_rl/test/test_template_generator.py -q(41 passed)uv run isaaclab -fuv run --isolated --extra test -- make -C docs current-docstrain,play,random_agent,zero_agent,benchmark, andtrain_multigpufrom the wheelChecklist
pre-commitchecks withuv run isaaclab -fsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.md