Skip to content

Adds local benchmarking tools with increased flexibility - #4550

Merged
kellyguo11 merged 20 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/benchmarks
Feb 10, 2026
Merged

kellyguo11 merged 20 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/benchmarks

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Introduces a self-contained benchmarking framework that removes the hard dependency on isaacsim.benchmark.services.

Key additions:

  • BaseIsaacLabBenchmark class with pluggable output backends (JSON, Osmo, OmniPerf)
  • Measurement types (SingleMeasurement, StatisticalMeasurement, DictMeasurement, ListMeasurement, BooleanMeasurement) and metadata types for structured recording
  • BenchmarkMonitor context manager for async resource monitoring during blocking RL training loops.
  • System recorders for CPU, GPU, memory, and version info collection
  • MethodBenchmarkRunner for method-level micro-benchmarks
  • Shell scripts for CI/CD integration (run_non_rl_benchmarks.sh, run_training_benchmarks.sh, run_physx_benchmarks.sh)

Updated:

  • PhysX micro-benchmarks to use the new framework
  • Documentation and changelogs

Type of change

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

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 updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Feb 5, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Feb 5, 2026
@greptile-apps

greptile-apps Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR introduces a self-contained benchmarking framework that removes the hard dependency on isaacsim.benchmark.services, significantly improving flexibility and modularity.

Key additions:

  • BaseIsaacLabBenchmark class with pluggable output backends (JSON, Osmo, OmniPerf)
  • Comprehensive measurement types: SingleMeasurement, StatisticalMeasurement, BooleanMeasurement, DictMeasurement, ListMeasurement
  • BenchmarkMonitor context manager for async resource monitoring during blocking RL training loops
  • System recorders: CPUInfoRecorder, GPUInfoRecorder, MemoryInfoRecorder, VersionInfoRecorder with Welford's algorithm for online statistics
  • MethodBenchmarkRunner for method-level micro-benchmarks with warmup/timing support
  • Shell scripts for CI/CD integration

Changes:

  • PhysX micro-benchmarks refactored to use new framework
  • RL training benchmarks updated to use BenchmarkMonitor for continuous resource monitoring
  • Removed old benchmark_io.py file (560 lines deleted)

Issues found:

  • Shell script run_non_rl_benchmarks.sh has a variable name bug ($task should be $TASK) that will cause the camera condition check to never match

Confidence Score: 4/5

  • Safe to merge after fixing the shell script variable name bug
  • Well-structured framework with comprehensive tests and clear architecture. The only critical issue is a shell script bug that will prevent camera-enabled benchmarks from running correctly. Code quality is high with proper error handling, statistical algorithms (Welford), and good separation of concerns.
  • scripts/benchmarks/run_non_rl_benchmarks.sh - Variable name case mismatch will break camera detection logic

Important Files Changed

Filename Overview
scripts/benchmarks/run_non_rl_benchmarks.sh New shell script with variable name case mismatch bug
source/isaaclab/isaaclab/test/benchmark/benchmark_core.py Core benchmark class refactored with pluggable backends and improved modularity
source/isaaclab/isaaclab/test/benchmark/backends.py New pluggable backend system with JSON, Osmo, and OmniPerf support
source/isaaclab/isaaclab/test/benchmark/measurements.py Comprehensive measurement types (Single, Statistical, Boolean, Dict, List) and metadata classes
source/isaaclab/isaaclab/test/benchmark/benchmark_monitor.py Context manager for async resource monitoring during blocking RL training loops
source/isaaclab/isaaclab/test/benchmark/method_benchmark.py Method-level micro-benchmark runner with warmup, timing, and statistical measurements

Sequence Diagram

sequenceDiagram
    participant User
    participant Benchmark as BaseIsaacLabBenchmark
    participant Backend as MetricsBackend
    participant Recorders as System Recorders
    participant Monitor as BenchmarkMonitor
    participant Training as RL Training Loop

    User->>Benchmark: Initialize(backend_type, output_path)
    Benchmark->>Backend: get_instance(backend_type)
    Backend-->>Benchmark: Return backend (JSON/Osmo/OmniPerf)
    Benchmark->>Recorders: Initialize CPUInfo, GPUInfo, MemoryInfo, VersionInfo
    Recorders-->>Benchmark: Recorders ready
    
    alt Blocking RL Training
        User->>Monitor: with BenchmarkMonitor(benchmark)
        Monitor->>Monitor: Start background thread
        loop Training iterations
            Training->>Training: runner.learn() [blocking]
            Monitor->>Recorders: update_manual_recorders() [async, every 1s]
            Recorders->>Recorders: Collect CPU/GPU/Memory stats using Welford algorithm
        end
        Training-->>Monitor: Training complete
        Monitor->>Monitor: Stop background thread
    else Non-blocking workflow
        User->>Benchmark: update_manual_recorders() [manual calls]
        Benchmark->>Recorders: update()
    end
    
    User->>Benchmark: add_measurement(phase_name, measurement)
    Benchmark->>Benchmark: Store in TestPhase
    
    User->>Benchmark: finalize()
    Benchmark->>Recorders: get_data()
    Recorders-->>Benchmark: Return measurements & metadata
    Benchmark->>Backend: add_metrics(test_phase)
    Backend->>Backend: Accumulate phases
    Benchmark->>Backend: finalize(output_path, filename)
    Backend->>Backend: Write JSON/Osmo/OmniPerf file
    Backend-->>User: Results written to file
Loading

@greptile-apps greptile-apps 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.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@kellyguo11 kellyguo11 changed the title Local benchmarking tools with increased flexibility Adds local benchmarking tools with increased flexibility Feb 6, 2026
Comment thread source/isaaclab/docs/CHANGELOG.rst Resolved
Comment thread source/isaaclab/config/extension.toml Resolved

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

Looks like some mismatch in names between the recorders and test cases, seeing failures in a couple of tests:

| /workspace/isaaclab/source/isaaclab_physx/test/assets/test_articulation.py | FAILED | 0.00 | -1/0 |
| /workspace/isaaclab/source/isaaclab/test/benchmark/test_benchmark_core.py | FAILED | 0.62 | 14/19 |
| /workspace/isaaclab/source/isaaclab/test/benchmark/test_recorders.py | FAILED | 2.95 | 26/43 |

@kellyguo11
kellyguo11 merged commit 405c4e1 into isaac-sim:develop Feb 10, 2026
7 of 10 checks passed
@preeves-nv preeves-nv mentioned this pull request Feb 12, 2026
6 of 7 tasks
kellyguo11 pushed a commit that referenced this pull request Mar 4, 2026
**Description**
Builds on the new benchmarking framework from #4550 by adding a
human-readable summary backend and wiring it into existing benchmark
scripts.

**Key additions:**
SummaryMetrics backend that prints a structured console summary and
still writes JSON
CLI summary backend support across benchmark scripts
Frametime recorder fallback for Isaac Sim packaging variants (bundled
frametime module)
Runtime stats unit fix (FPS vs ms) and num_cpus in summary header
**Updated:**
Benchmark scripts to enable frametime recorders only when summary is
selected

**Bug fix:** Runtime stats were previously logged with unit "ms" for
every metric, so FPS metrics (e.g. Collection FPS, Total FPS) were
mislabelled. The fix infers the unit from the metric key name (FPS vs
time) so the summary shows correct units. Location:
scripts/benchmarks/utils.py, log_min_max_mean_stats.

**Type of change**
New feature (non-breaking change which adds functionality)
Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: preeves-nv <[email protected]>
Signed-off-by: Antoine RICHARD <[email protected]>
Co-authored-by: Cursor <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Antoine RICHARD <[email protected]>
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 isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants