Skip to main content

LEAPP: Lightweight Export Annotations for Policy Pipelines

Full Isaac LEAPP docs

Export the policy code you already run: preprocessing, model inference, and action processing together.

Isaac LEAPP is NVIDIA's library for machine learning pipeline export. It traces supported PyTorch and NumPy computation across existing functions and objects. Export the complete path as one ONNX, TorchScript, or PT2 model, or choose separate stages when useful.

Input and output annotations capture computation as your application runs. A single model can capture computation across multiple input call sites, helper functions, and class methods. The annotations work directly in application code without a prescribed RL environment interface. See annotation patterns.

  • Keep processing with the policy. Capture supported NumPy preprocessing, conversions into PyTorch, and action transforms together. Warp kernel regions can also be captured into ONNX or PT2 with an additional runtime adapter.
  • Adapt unsupported calls with FunctionPatch. Register a faithful replacement built from supported operations; existing module-level callers can stay in place.
  • Describe the deployment interface. Attach tensor roles, joint names, and timing information with semantic metadata, so downstream applications can interpret model inputs and outputs.
  • Inspect and validate the export. Compare exported outputs, including state updates, against cached samples from consecutive Python iterations. Configure sample coverage, inspect the graph, and use sequential replay to check accumulated drift and runtime feedback.

Quick start

pip install leapp

Requires Python 3.10+ and PyTorch 2.7.0+.

This example exports NumPy preprocessing, a small PyTorch policy, and action scaling and clipping together:

import numpy as np
import torch
import leapp
from leapp import annotate

def make_observation(position, velocity):
    return np.concatenate([np.clip(position, -1.0, 1.0), velocity * 0.1])

policy = torch.nn.Sequential(
    torch.nn.Linear(12, 32), torch.nn.Tanh(), torch.nn.Linear(32, 6),
).eval()

leapp.start(name="robot_policy")
position, velocity = annotate.input_tensors("control", {
    "position": np.zeros(6, dtype=np.float32),
    "velocity": np.ones(6, dtype=np.float32),
})

with torch.no_grad():
    observation = torch.from_numpy(make_observation(position, velocity))
    targets = torch.clamp(policy(observation) * 0.25, -1.0, 1.0)

annotate.output_tensors("control", {"targets": targets}, export_with="onnx")

leapp.stop()
leapp.compile_graph(validate=True)

Produces robot_policy/control.onnx, a YAML interface specification, and a graph PNG on Python 3.11+. This stateless model runs directly in ONNX Runtime; InferenceManager loads the bundle for Python replay. Other applications can consume the exported artifacts through their chosen backend runtime.

Capture scope

LEAPP captures the executed tensor path. Data-dependent Python branches are not preserved dynamically, and unsupported operations or scalar extraction can freeze values. Check tracing warnings and validate on fresh inputs. See PyTorch and NumPy limitations.

Getting started · Export options · API reference

License

Copyright (c) 2026, NVIDIA Corporation & affiliates. Licensed under the Apache License, Version 2.0. See LICENSE and thirdparty.txt.

Metadata

Release files for leapp 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for leapp 0.8.1
File Interpreter ABI Platform Actions
leapp-0.8.1-py3-none-any.whl Python 3 none any Details for leapp-0.8.1-py3-none-any.whl

Release files / leapp-0.8.1-py3-none-any.whl

Download URL leapp-0.8.1-py3-none-any.whl
Size 247.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b6456c890d41e50712c4fb739bbe4faf0c53305dc2bc75d477b67be9dde9a54
BLAKE2b-256 checksum
How to use checksums
2f46ce80f279ecc5bfe93df26c424bf4f3578b226cc6ab05e53cef29a324bec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for leapp 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page