Skip to content

Frlai/improve leapp export - #7326

Open
frlai wants to merge 14 commits into
isaac-sim:developfrom
frlai:frlai/improve_leapp_export
Open

Frlai/improve leapp export#7326
frlai wants to merge 14 commits into
isaac-sim:developfrom
frlai:frlai/improve_leapp_export

Conversation

@frlai

@frlai frlai commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Small additive updates for leapp.

  1. Pins the leapp version to latest 0.6.1 which improves robustness for slicing operations. Previously this wasn't supported but now new features should automatically enable more types of operations.
  2. Adds graph level expected frequency to leapp yaml. This change helps downstream deployment set default frequency based on training configs.
  3. Adds the Isaac Lab env.yaml to the exported leapp bundle for convenience. Isaac sim 6.2 will add leapp controller features. the env.yaml is required to set things up. This will make porting the policy and its environment much more convenient.

Type of change

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

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Checklist

  • 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 (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@frlai
frlai requested a review from a team August 24, 2026 23:16
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team infrastructure labels Aug 24, 2026
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades the optional LEAPP dependency to 0.6.1 and enriches exports with policy-frequency metadata and the originating environment configuration.

  • Computes graph frequency from the environment’s simulation timestep and decimation.
  • Applies the metadata and env.yaml export consistently across RL-Games, RSL-RL, SB3, and SKRL.
  • Extends direct and multi-backend export-flow tests to validate the new artifacts.
  • Updates deployment documentation, changelog, and dependency lock data.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The frequency calculation matches the canonical policy step period for both supported environment families, all exporters apply the same artifact contract, and the updated integration tests validate metadata-to-environment parity.

Important Files Changed

Filename Overview
scripts/reinforcement_learning/leapp/export_utils.py Adds a shared graph-configuration helper using the canonical environment policy period.
scripts/reinforcement_learning/leapp/rl_games/export.py Adds graph frequency metadata and environment YAML to RL-Games exports.
scripts/reinforcement_learning/leapp/rsl_rl/export.py Adds the shared metadata and environment artifact to manager-based and direct RSL-RL exports.
scripts/reinforcement_learning/leapp/sb3/export.py Adds graph frequency metadata and environment YAML to SB3 exports.
scripts/reinforcement_learning/leapp/skrl/export.py Adds graph frequency metadata and environment YAML to SKRL exports.
source/isaaclab_rl/test/export/test_leapp_export_flow.py Verifies graph frequency and environment configuration parity across backend export flows.
source/isaaclab_rl/test/export/test_rsl_rl_direct_export_flow.py Extends direct-environment export coverage for the new metadata and environment artifact.
pyproject.toml Pins the optional LEAPP dependency to version 0.6.1.
uv.lock Resolves LEAPP 0.6.1 and refreshes associated lock metadata and platform artifacts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  C[Environment configuration] --> F[Compute frequency from sim.dt × decimation]
  F --> G[LEAPP GraphConfigs]
  P[Policy checkpoint] --> E[RL-specific exporter]
  G --> E
  E --> L[Compile LEAPP graph]
  L --> A[Model and graph artifacts]
  C --> Y[Write env.yaml]
  Y --> A
  A --> D[Downstream deployment]
Loading

Reviews (1): Last reviewed commit: "bumped pinned leapp version to 0.6.1, le..." | Re-trigger 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

Reviewed the LEAPP 0.6.1 integration, including policy-frequency metadata, bundled environment configuration, all four RL export backends, documentation, release metadata, and export-flow tests. The changed producer and artifact paths are consistent across backends.

  • Design and architecture: Policy frequency is derived centrally from the environment control period (sim.dt * decimation) and passed through the existing deferred-import structure used by the RSL-RL, RL-Games, skrl, and SB3 exporters. Each backend writes env.yaml into the same graph-specific artifact directory, keeping the bundle layout uniform.
  • API: No existing Isaac Lab CLI option or export artifact is removed or renamed. The LEAPP dependency is pinned to 0.6.1 to match the newly used graph configuration API, while the new frequency metadata and env.yaml artifact are documented and included in the package changelog.
  • Implementation: The graph configuration and environment dump are wired into all four compile paths using the same env_cfg, save_path, and graph_name. Integration assertions verify that both artifacts exist and that the graph frequency matches 1 / (sim.dt * decimation), including the direct-environment RSL-RL path.

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.

@kellyguo11 kellyguo11 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.

@StafaH do you mind checking on the uv.lock changes?

@StafaH StafaH 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.

Thanks for the PR @frlai. I left a comment about moving the logic in a follow up PR, but on that note, we have also been migrating everyone to move logic to uv run isaaclab. Currently you can do:

uv run isaaclab train <rest of args>
uv run isaaclab benchmark startup <rest of args>
uv run isaaclab teleop record <rest of args>

Might be time to add leapp export, wdyt?

uv run isaaclab export <rest of args>

This would require 1) moving logic to isaaclab_rl and 2) getting hooked up correctly to cli.py

Comment thread uv.lock
@@ -171,8 +171,16 @@ dependencies = [
sdist = { url = "https://files.pythonhosted.org/packages/45/4a/064321452809dae953c1ed6e017504e72551a26b6f5708a5a80e4bf556ff/aiohttp-3.13.4.tar.gz", hash = "sha256:d97a6d09c66087890c2ab5d49069e1e570583f7ac0314ecf98294c1b6aaebd38", size = 7859748, upload-time = "2026-03-28T17:19:40.6Z" }

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.

Why is the lock changing? Optional dependencies usually don't change the lock that much, you can double check if this lock change is necessary locally by doing a uv lock --check on a fresh install (no leapp installed just base install)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Previous issue was that I didn't clean the lock file before pushing. newest version has exactly 3 changes.

@@ -40,6 +40,8 @@
is_two_tensor_lstm_state = None

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.

The changes look reasonable, but just FYI, we moved almost all logic out of the scripts into isaaclab_rl, so leapp is currently the only logic left behind here. Benefit of moving to isaaclab_rl is that downstream package install gets access.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I would prefer that too. previously noticed that we were doing that but wasn't sure about the scope. I think it's relevant enough to add to this PR. Unless you have a preference for smaller PRs.

@frlai
frlai force-pushed the frlai/improve_leapp_export branch from 27a4204 to 91b115e Compare August 29, 2026 00:59
@frlai frlai mentioned this pull request Aug 29, 2026
8 tasks
@frlai

frlai commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator Author

@StafaH if this looks good can you approve it? we can discuss the migration it isaaclab_rl separately.

@kellyguo11 kellyguo11 moved this to In review in Isaac Lab Sep 1, 2026
@frlai

frlai commented Sep 3, 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 3, 2026
@frlai
frlai enabled auto-merge (squash) September 4, 2026 07:25
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

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants