isaaclab.benchmark#
Benchmarking utilities for IsaacLab.
This package provides the public benchmark framework and workflow API.
Request and result classes
Simulation launcher configuration shared by benchmark workflows. |
|
Output configuration shared by benchmark workflows. |
|
Request an RL checkpoint playback benchmark. |
|
Completed benchmark result. |
|
Request an environment runtime benchmark. |
|
Request a startup profiling benchmark. |
|
Request an RL training benchmark. |
Workflow functions
Run a benchmark workflow from a typed request. |
|
|
Run an RL checkpoint playback benchmark. |
|
Run an environment runtime benchmark. |
|
Run a startup profiling benchmark. |
|
Run an RL training benchmark. |
Benchmark framework
Base benchmark class for IsaacLab's benchmarks. |
|
Background thread that periodically updates benchmark recorders. |
|
Definition of a method benchmark. |
|
Runner for method-level benchmarks using the new benchmark tooling. |
|
Configuration for MethodBenchmarkRunner. |
|
Top-level shape of |
|
Top-level shape of |
|
Top-level shape of |
|
Top-level shape of |
Request and Result Classes#
- class isaaclab.benchmark.BenchmarkLauncherConfig[source]#
Simulation launcher configuration shared by benchmark workflows.
- Parameters:
device¶ – Simulation device identifier, such as
"cpu"or"cuda:0".enable_cameras¶ – Whether to enable camera rendering.
visualizers¶ – Visualizers to enable. An empty tuple explicitly disables all visualizers;
Nonepreserves task and environment defaults.max_visible_envs¶ – Maximum number of environments shown by visualizers.
experience¶ – Isaac Sim experience file.
deterministic¶ – Whether to request deterministic rendering and backend behavior.
animation_recording¶ – Whether to record time-sampled USD animations.
animation_recording_start_time¶ – Simulation time when animation recording starts [s].
animation_recording_stop_time¶ – Simulation time when animation recording stops [s].
kit_args¶ – Arguments forwarded directly to Omniverse Kit.
livestream¶ – Livestream mode, where
0disables and1or2enables WebRTC.xr¶ – Whether to enable XR mode.
verbose¶ – Whether to enable verbose simulator logging.
info¶ – Whether to enable informational simulator logging.
Methods:
__init__([device, enable_cameras, ...])- __init__(device: str | None = None, enable_cameras: bool = False, visualizers: tuple[Literal['kit', 'newton', 'rerun', 'viser'], ...] | None = None, max_visible_envs: int | None = None, experience: str | None = None, deterministic: bool = False, animation_recording: bool = False, animation_recording_start_time: float | None = None, animation_recording_stop_time: float | None = None, kit_args: str | None = None, livestream: Literal[0, 1, 2] | None = None, xr: bool = False, verbose: bool = False, info: bool = False) None#
- class isaaclab.benchmark.BenchmarkOutputConfig[source]#
Output configuration shared by benchmark workflows.
- Parameters:
Methods:
__init__([path, formatters])
- class isaaclab.benchmark.BenchmarkPlayRequest[source]#
Request an RL checkpoint playback benchmark.
- Parameters:
backend¶ – Reinforcement-learning backend to benchmark.
task¶ – Registered Gym task identifier.
checkpoint¶ – Local or Nucleus checkpoint path. When omitted, the backend may use a published checkpoint.
agent¶ – Optional task agent configuration entry point.
num_envs¶ – Number of parallel environments.
num_frames¶ – Number of measured inference steps.
warmup_frames¶ – Number of initial environment steps excluded from environment-step timing.
seed¶ – Environment seed.
measure_synchronized_step_breakdown¶ – Whether to collect serialized synchronized environment/simulation step diagnostics.
presets¶ – Typed preset names applied to the task configuration.
backend_args¶ – Backend-specific command-line arguments.
hydra_args¶ – Additional Hydra overrides.
output¶ – Output configuration.
launcher¶ – Simulation launcher configuration.
Attributes:
Return the workflow dispatcher key.
Methods:
__init__(backend, task[, checkpoint, agent, ...])- __init__(backend: ~typing.Literal['rl_games', 'rsl_rl', 'sb3', 'skrl'], task: str, checkpoint: str | None = None, agent: str | None = None, num_envs: int | None = None, num_frames: int = 100, warmup_frames: int = 1, seed: int | None = None, measure_synchronized_step_breakdown: bool = False, presets: tuple[str, ...] = <factory>, backend_args: tuple[str, ...] = <factory>, hydra_args: tuple[str, ...] = <factory>, output: ~isaaclab.benchmark.api.BenchmarkOutputConfig = <factory>, launcher: ~isaaclab.benchmark.api.BenchmarkLauncherConfig = <factory>) None#
- class isaaclab.benchmark.BenchmarkResult[source]#
Completed benchmark result.
- Parameters:
Methods:
__init__(bundle, output_paths)
- class isaaclab.benchmark.BenchmarkRuntimeRequest[source]#
Request an environment runtime benchmark.
- Parameters:
task¶ – Registered Gym task identifier.
num_envs¶ – Number of parallel environments.
num_frames¶ – Number of measured environment steps.
warmup_frames¶ – Number of warm-up steps excluded from throughput measurements.
seed¶ – Environment seed.
measure_synchronized_step_breakdown¶ – Whether to collect serialized synchronized environment/simulation step diagnostics.
presets¶ – Typed preset names applied to the task configuration.
hydra_args¶ – Additional Hydra overrides.
output¶ – Output configuration.
launcher¶ – Simulation launcher configuration.
Attributes:
Return the workflow dispatcher key.
Methods:
__init__(task[, num_envs, num_frames, ...])- __init__(task: str, num_envs: int | None = None, num_frames: int = 1000, warmup_frames: int = 50, seed: int | None = None, measure_synchronized_step_breakdown: bool = False, presets: tuple[str, ...] = <factory>, hydra_args: tuple[str, ...] = <factory>, output: ~isaaclab.benchmark.api.BenchmarkOutputConfig = <factory>, launcher: ~isaaclab.benchmark.api.BenchmarkLauncherConfig = <factory>) None#
- class isaaclab.benchmark.BenchmarkStartupRequest[source]#
Request a startup profiling benchmark.
- Parameters:
task¶ – Registered Gym task identifier.
num_envs¶ – Number of parallel environments.
seed¶ – Environment seed.
top_n¶ – Number of top cProfile functions retained per phase.
whitelist_config¶ – Optional YAML whitelist for phase-specific functions.
presets¶ – Typed preset names applied to the task configuration.
hydra_args¶ – Additional Hydra overrides.
output¶ – Output configuration.
launcher¶ – Simulation launcher configuration.
Attributes:
Return the workflow dispatcher key.
Methods:
__init__(task[, num_envs, seed, top_n, ...])- __init__(task: str, num_envs: int | None = None, seed: int | None = None, top_n: int | None = None, whitelist_config: ~pathlib.Path | None = None, presets: tuple[str, ...] = <factory>, hydra_args: tuple[str, ...] = <factory>, output: ~isaaclab.benchmark.api.BenchmarkOutputConfig = <factory>, launcher: ~isaaclab.benchmark.api.BenchmarkLauncherConfig = <factory>) None#
- class isaaclab.benchmark.BenchmarkTrainingRequest[source]#
Request an RL training benchmark.
- Parameters:
backend¶ – Reinforcement-learning backend to benchmark.
task¶ – Registered Gym task identifier.
agent¶ – Optional task agent configuration entry point.
num_envs¶ – Number of parallel environments.
seed¶ – Environment and agent seed.
max_iterations¶ – Maximum training iterations.
warmup_steps¶ – Number of initial environment steps excluded from environment-step timing.
ray_proc_id¶ – Ray worker process identifier.
video¶ – Whether to record training videos.
video_length¶ – Recorded video length [steps].
video_interval¶ – Interval between video recordings [steps].
export_io_descriptors¶ – Whether to export environment IO descriptors.
capture_env_sensors¶ – Number of environment views captured from each image-like sensor.
capture_env_sensors_length¶ – Length of each sensor capture window [steps].
capture_env_sensors_interval¶ – Interval between sensor capture windows [steps].
capture_env_sensors_format¶ – Storage format for captured sensor frames.
ema_alpha¶ – Learning-curve exponential moving-average coefficient.
keep_series¶ – Whether to retain full per-iteration learning series.
check_success¶ – Whether supported backends should stop after success convergence.
success_threshold¶ – Optional success threshold override.
success_window¶ – Optional success convergence window override [iterations].
measure_synchronized_step_breakdown¶ – Whether to collect serialized synchronized environment/simulation step diagnostics.
presets¶ – Typed preset names applied to the task configuration.
backend_args¶ – Backend-specific command-line arguments.
hydra_args¶ – Additional Hydra overrides.
output¶ – Output configuration.
launcher¶ – Simulation launcher configuration.
Attributes:
Return the workflow dispatcher key.
Methods:
__init__(backend, task[, agent, num_envs, ...])- __init__(backend: ~typing.Literal['rl_games', 'rsl_rl', 'sb3', 'skrl'], task: str, agent: str | None = None, num_envs: int | None = None, seed: int | None = None, max_iterations: int | None = None, warmup_steps: int = 1, ray_proc_id: int | None = None, video: bool = False, video_length: int = 200, video_interval: int = 2000, export_io_descriptors: bool = False, capture_env_sensors: int = 0, capture_env_sensors_length: int = 200, capture_env_sensors_interval: int = 2000, capture_env_sensors_format: ~typing.Literal['tensorboard', 'file'] = 'tensorboard', ema_alpha: float = 0.1, keep_series: bool = True, check_success: bool = False, success_threshold: float | None = None, success_window: int | None = None, measure_synchronized_step_breakdown: bool = False, presets: tuple[str, ...] = <factory>, backend_args: tuple[str, ...] = <factory>, hydra_args: tuple[str, ...] = <factory>, output: ~isaaclab.benchmark.api.BenchmarkOutputConfig = <factory>, launcher: ~isaaclab.benchmark.api.BenchmarkLauncherConfig = <factory>) None#
Workflow Functions#
- isaaclab.benchmark.run_benchmark(request: BenchmarkRuntimeRequest) BenchmarkResult[RuntimeBundle][source]#
- isaaclab.benchmark.run_benchmark(request: BenchmarkStartupRequest) BenchmarkResult[StartupBundle]
- isaaclab.benchmark.run_benchmark(request: BenchmarkTrainingRequest) BenchmarkResult[TrainingBundle]
- isaaclab.benchmark.run_benchmark(request: BenchmarkPlayRequest) BenchmarkResult[PlayBundle]
Run a benchmark workflow from a typed request.
- Parameters:
request¶ – Runtime, startup, training, or play benchmark request.
- Returns:
Completed benchmark bundle and output paths.
- isaaclab.benchmark.run_play_benchmark(request: BenchmarkPlayRequest) BenchmarkResult[PlayBundle][source]#
Run an RL checkpoint playback benchmark.
- Parameters:
request¶ – Playback benchmark request.
- Returns:
Completed benchmark bundle and output paths.
- isaaclab.benchmark.run_runtime_benchmark(request: BenchmarkRuntimeRequest) BenchmarkResult[RuntimeBundle][source]#
Run an environment runtime benchmark.
- Parameters:
request¶ – Runtime benchmark request.
- Returns:
Completed benchmark bundle and output paths.
- isaaclab.benchmark.run_startup_benchmark(request: BenchmarkStartupRequest) BenchmarkResult[StartupBundle][source]#
Run a startup profiling benchmark.
- Parameters:
request¶ – Startup benchmark request.
- Returns:
Completed benchmark bundle and output paths.
- isaaclab.benchmark.run_training_benchmark(request: BenchmarkTrainingRequest) BenchmarkResult[TrainingBundle][source]#
Run an RL training benchmark.
- Parameters:
request¶ – Training benchmark request.
- Returns:
Completed benchmark bundle and output paths.
Benchmark Framework#
- class isaaclab.benchmark.BaseIsaacLabBenchmark[source]#
Base benchmark class for IsaacLab’s benchmarks.
Methods:
__init__(benchmark_name[, formatter_type, ...])Initialize common benchmark state and recorders.
attach_bundle(bundle)Attach a typed bundle for schema serialization and flat-formatter projection.
Update manual recorders that don't depend on the kit timeline.
add_measurement(phase_name[, measurement, ...])Add a measurement to the benchmark.
finalize()Finalize metric collection and write selected formatter outputs.
Attributes:
Get the full path to the output file.
- __init__(benchmark_name: str, formatter_type: str | list[str] | None = None, output_path: str | None = None, use_recorders: bool = True, output_prefix: str | None = None, workflow_metadata: dict | None = None, frametime_recorders: bool = False, backend_type: str | list[str] | None = None)[source]#
Initialize common benchmark state and recorders.
- Parameters:
benchmark_name¶ – Name of benchmark to use in outputs.
formatter_type¶ – Formatter(s) used to collect and print metrics. Accepts a single type name, a list of type names, or a comma-separated string (e.g.
"schema,omniperf"); each selected formatter writes its own output file.output_path¶ – Path to output directory.
use_recorders¶ – Whether to use recorders to collect metrics. Defaults to True.
output_prefix¶ – Prefix used to generate the output filename. Defaults to
None.workflow_metadata¶ – Metadata describing benchmark, defaults to None.
frametime_recorders¶ – Whether to use frametime recorders to collect metrics. Defaults to
False.backend_type¶ – Alias for
formatter_type.
- attach_bundle(bundle: RuntimeBundle | TrainingBundle | StartupBundle | PlayBundle | None) None[source]#
Attach a typed bundle for schema serialization and flat-formatter projection.
- Parameters:
bundle¶ – Runtime, training, startup, or play benchmark bundle.
- update_manual_recorders() None[source]#
Update manual recorders that don’t depend on the kit timeline.
- class isaaclab.benchmark.BenchmarkMonitor[source]#
Background thread that periodically updates benchmark recorders.
This utility enables continuous system resource monitoring during blocking RL training loops (RSL-RL, RL-Games) where update_manual_recorders() would otherwise only be called once after training completes.
- Usage:
- with BenchmarkMonitor(benchmark, interval=1.0):
runner.learn(…) # Blocking training call
Methods:
__init__(benchmark[, interval])Initialize the benchmark monitor.
start()Start the monitoring thread.
stop()Stop the monitoring thread and wait for it to finish.
- __init__(benchmark: BaseIsaacLabBenchmark, interval: float = 1.0)[source]#
Initialize the benchmark monitor.
- class isaaclab.benchmark.MethodBenchmarkDefinition[source]#
Definition of a method benchmark.
- input_generators#
Dict mapping mode names to input generator functions.
- Type:
Methods:
__init__(name, method_name, input_generators)
- class isaaclab.benchmark.MethodBenchmarkRunner[source]#
Runner for method-level benchmarks using the new benchmark tooling.
This class extends BaseIsaacLabBenchmark to provide method-level benchmarking with automatic hardware/version info collection, multiple backend support, and organized output by category phases.
Methods:
__init__(benchmark_name, config[, ...])Initialize the method benchmark runner.
run_benchmarks(benchmarks, target_object)Run all defined benchmarks on the target object.
run_property_benchmarks(target_data, ...[, ...])Run benchmarks for data class properties.
Attributes:
Return the benchmark configuration.
- __init__(benchmark_name: str, config: MethodBenchmarkRunnerConfig, backend_type: str = 'json', output_path: str = '.', use_recorders: bool = True)[source]#
Initialize the method benchmark runner.
- property config: MethodBenchmarkRunnerConfig#
Return the benchmark configuration.
- run_benchmarks(benchmarks: list[MethodBenchmarkDefinition], target_object: object) None[source]#
Run all defined benchmarks on the target object.
- run_property_benchmarks(target_data: object, properties: list[str], gen_mock_data: Callable, dependencies: dict[str, list[str]] | None = None, category: str = 'property') None[source]#
Run benchmarks for data class properties.
This is a convenience method for benchmarking properties on data classes where the test involves generating mock data and accessing properties.
- Parameters:
target_data¶ – Data object containing the properties to benchmark.
properties¶ – List of property names to benchmark.
gen_mock_data¶ – Function that generates/updates mock data.
dependencies¶ – Optional dict mapping property names to their dependencies.
category¶ – Category name for grouping results.
- class isaaclab.benchmark.MethodBenchmarkRunnerConfig[source]#
Configuration for MethodBenchmarkRunner.
Methods:
__init__([num_iterations, warmup_steps, ...])
- class isaaclab.benchmark.PlayBundle[source]#
Top-level shape of
play.json— a checkpoint-driven inference rollout.Mirrors
RuntimeBundle(withRunIdentity.frameworkset to the RL library that produced the checkpoint) and adds the inference-evaluation aggregates: a success rate plus scalar reward and episode-length statistics. UnlikeTrainingBundle,rewardandep_lengthare scalarMeanStdaggregates over completed episodes, not per-iteration learning curves.- Parameters:
success_rate¶ – Mean success rate
[0..1]over completed episodes, orNonewhen the task does not report one.reward¶ – Episode-return aggregate over completed episodes, or
Nonewhen no episode completed.ep_length¶ – Episode-length aggregate over completed episodes, or
Nonewhen no episode completed.checkpoint_path¶ – Path to the policy checkpoint that was rolled out.
video_path¶ – Path to a recorded rollout video/gif, if any.
extra¶ – Optional free-form scalar values (experimental or producer-specific) that are not part of the stable schema contract. Consumers must tolerate its absence and must not depend on specific keys; promote a key to a typed field once it is stable and broadly useful.
Methods:
__init__(run, versions, hardware, runtime, ...)- __init__(run: RunIdentity, versions: Versions, hardware: Hardware, runtime: Runtime, resources: Resources, success_rate: float | None = None, reward: MeanStd | None = None, ep_length: MeanStd | None = None, checkpoint_path: str | None = None, video_path: str | None = None, extra: dict[str, float | int | str | bool] | None = None, schema_version: str = '1.2') None#
- class isaaclab.benchmark.RuntimeBundle[source]#
Top-level shape of
runtime.json(environment stepping, no learning).Mirrors
TrainingBundlewithout the learning metrics.- Parameters:
extra¶ – Optional free-form scalar values (experimental or producer-specific) that are not part of the stable schema contract. Consumers must tolerate its absence and must not depend on specific keys; promote a key to a typed field once it is stable and broadly useful.
Methods:
__init__(run, versions, hardware, runtime, ...)
- class isaaclab.benchmark.StartupBundle[source]#
Top-level shape of
startup.json.Reuses
RunIdentitywithframework/num_envs/max_iterationsleft unset, since they are not meaningful for a startup profile.- Parameters:
extra¶ – Optional free-form scalar values (experimental or producer-specific) that are not part of the stable schema contract. Consumers must tolerate its absence and must not depend on specific keys; promote a key to a typed field once it is stable and broadly useful.
Methods:
__init__(run, versions, hardware, phases, config)
- class isaaclab.benchmark.TrainingBundle[source]#
Top-level shape of
training.json— a runtime bundle plus learning metrics.- Parameters:
success_rate¶ – Final success rate [0..1] when the task tracks one, else
None.checkpoint_path¶ – Path to the final saved policy checkpoint, if any.
video_path¶ – Path to a recorded rollout video/gif, if any.
extra¶ – Optional free-form scalar values (experimental or producer-specific) that are not part of the stable schema contract. Consumers must tolerate its absence and must not depend on specific keys; promote a key to a typed field once it is stable and broadly useful.
Methods:
__init__(run, versions, hardware, runtime, ...)- __init__(run: RunIdentity, versions: Versions, hardware: Hardware, runtime: Runtime, resources: Resources, learning: Learning, success_rate: float | None = None, checkpoint_path: str | None = None, video_path: str | None = None, extra: dict[str, float | int | str | bool] | None = None, schema_version: str = '1.2') None#