Skip to content

Adds preset metadata to benchmark JSON output - #4814

Merged
kellyguo11 merged 4 commits into
developfrom
feature/rendering-preset-benchmarks
Mar 4, 2026
Merged

kellyguo11 merged 4 commits into
developfrom
feature/rendering-preset-benchmarks

Conversation

@preeves-nv

@preeves-nv preeves-nv commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Benchmark JSON output now includes a presets field in the benchmark_info workflow metadata, allowing dashboards and DB to distinguish runs made with different physics/renderer/data-type permutations.

  • Adds get_preset_string() to scripts/benchmarks/utils.py — extracts the active preset from CLI hydra args (presets=physx,ovrtx_renderer,rgb), the ISAACLAB_BENCHMARK_PRESET env var, or falls back to "default"
  • All three benchmark scripts (benchmark_non_rl.py, benchmark_rlgames.py, benchmark_rsl_rl.py) now include {"name": "presets", "data": "..."} in their workflow_metadata

Migration note for external runners

The environment variable for passing presets has been renamed from OMNIPERF_ISAACLAB_PRESET to ISAACLAB_BENCHMARK_PRESET. Any CI runner or script that sets the old env var should update to use the new name:

- env["OMNIPERF_ISAACLAB_PRESET"] = "physx,ovrtx_renderer,rgb"
+ env["ISAACLAB_BENCHMARK_PRESET"] = "physx,ovrtx_renderer,rgb"

Context

This addresses a gap identified while integrating rendering permutation testing into the Omniperf CI pipeline (Soowan Park's omniperf-benchmark MR). The runner sends a preset string to benchmark scripts, but the resulting JSON had no record of which preset was used — making runs with different presets indistinguishable in the DB.

Type of change

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

Test plan

  • Smoke test: benchmark_non_rl.py with presets=physx — JSON contains "presets": "physx"
  • Smoke test: no presets — JSON contains "presets": "default"
  • Verified no change to existing JSON keys/structure (additive only)

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

Benchmark scripts now capture the active preset string (e.g.
"physx,ovrtx_renderer,rgb") and include it in the benchmark_info
workflow_metadata. Sources checked in order:

1. CLI hydra arg: presets=physx,ovrtx_renderer,rgb
2. Env var: OMNIPERF_ISAACLAB_PRESET (used by Omniperf CI runner)
3. Fallback: "default"

This allows the Omniperf dashboard and DB to distinguish runs made
with different physics/renderer/data-type permutations.

Made-with: Cursor
Moves the duplicated preset-capture logic from each benchmark script
into get_preset_string() in scripts/benchmarks/utils.py. No behavior
change — same 3 sources checked in the same order (CLI hydra arg,
OMNIPERF_ISAACLAB_PRESET env var, "default" fallback).

Made-with: Cursor
@github-actions github-actions Bot added enhancement New feature or request isaac-lab Related to Isaac Lab team labels Mar 4, 2026
@preeves-nv preeves-nv self-assigned this Mar 4, 2026
@greptile-apps

greptile-apps Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a presets field to the benchmark_info workflow metadata in all three benchmark scripts, allowing the Omniperf dashboard and DB to distinguish runs made with different physics/renderer/data-type permutations. The change is purely additive — no existing JSON keys or script behaviour are altered.

  • Adds get_preset_string(hydra_args) to scripts/benchmarks/utils.py, which resolves the active preset from (in priority order) a CLI hydra arg (presets=...), the OMNIPERF_ISAACLAB_PRESET env var, or the literal string "default". Minor issue: Empty CLI values (presets= with no value) return "" instead of falling back to "default", unlike the env-var path.
  • All three benchmark scripts (benchmark_non_rl.py, benchmark_rlgames.py, benchmark_rsl_rl.py) import the helper and pass get_preset_string(hydra_args) as the "presets" metadata entry at module-level benchmark construction time

Confidence Score: 4/5

  • Safe to merge — it is a purely additive metadata change with no impact on simulation logic or existing JSON structure.
  • This PR is safe to merge: it is a purely additive metadata change with no impact on simulation logic or existing JSON structure. The identified issue is a minor inconsistency in empty-string handling for the CLI path that should be addressed before merging. The inconsistency does not cause a runtime error but violates the principle of least surprise by making the two lookup paths behave differently when given empty values.
  • scripts/benchmarks/utils.py — Fix the empty-string handling inconsistency in get_preset_string() to ensure both CLI and env-var paths fall back to "default" when the value is empty.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[benchmark script starts] --> B["parser.parse_known_args()\nreturns hydra_args"]
    B --> C["get_preset_string(hydra_args)"]
    C --> D{Any arg starts\nwith 'presets='?}
    D -- Yes --> E["return split value\n(may be empty string\nif presets= with no value)"]
    D -- No --> F{OMNIPERF_ISAACLAB_PRESET\nenv var set and non-empty?}
    F -- Yes --> G["return env var value"]
    F -- No --> H["return 'default'"]
    E --> I["workflow_metadata\npresets field set"]
    G --> I
    H --> I
    I --> J["BaseIsaacLabBenchmark\nconstructor"]
    J --> K["JSON output includes\nbenchmark_info.presets"]
Loading

Last reviewed commit: 11952a6

Comment thread scripts/benchmarks/utils.py Resolved
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: preeves-nv <[email protected]>
Comment thread scripts/benchmarks/utils.py Resolved
Addresses review from @bareya: the env var should not be
Omniperf-specific. Renamed from OMNIPERF_ISAACLAB_PRESET to
ISAACLAB_BENCHMARK_PRESET. Omniperf CI runners should update
to set the new env var name.

Made-with: Cursor
@fatimaanes
fatimaanes self-requested a review March 4, 2026 18:24
@kellyguo11
kellyguo11 merged commit e9a2a58 into develop Mar 4, 2026
11 checks passed
@kellyguo11
kellyguo11 deleted the feature/rendering-preset-benchmarks branch March 4, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants