Skip to content

Report resolved camera resolutions in benchmark KPIs - #7402

Open
yts-nv wants to merge 9 commits into
isaac-sim:developfrom
yts-nv:codex/benchmark-camera-resolution
Open

Report resolved camera resolutions in benchmark KPIs#7402
yts-nv wants to merge 9 commits into
isaac-sim:developfrom
yts-nv:codex/benchmark-camera-resolution

Conversation

@yts-nv

@yts-nv yts-nv commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Description

OmniPerf camera benchmark jobs currently record the requested resolution in runner metadata, but the Isaac Lab KPI payload does not record the resolved camera configuration. This makes it impossible for downstream dashboards to distinguish a verified 64x64 run from a run that retained the task default.

This change:

  • traverses the concrete environment config after Hydra and command-line overrides are applied;
  • records each CameraCfg and RayCasterCameraCfg path with its resolved image width and height;
  • emits the data under benchmark_info.camera_resolutions for runtime, startup, training, and play benchmarks across RSL-RL, RL-Games, SKRL, and SB3;
  • omits the field for tasks without a configured camera resolution.

Example KPI metadata:

{
  "camera_resolutions": {
    "env.scene.tiled_camera": {
      "width": 64,
      "height": 64
    }
  }
}

Type of change

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

Release backport

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

Screenshots

Not applicable.

Validation

  • 21 focused benchmark capture and KPI serialization tests passed.
  • Real Hydra composition verified Isaac-Cartpole-Camera reports env.scene.tiled_camera at 64x64.
  • Real Hydra composition verified Isaac-Cartpole-Camera-Direct reports env.tiled_camera at 64x64.
  • The complete uv run isaaclab -f gate passed, including Ruff, formatting, codespell, changelog, and Git LFS checks.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks
  • I have made corresponding changes to the documentation; no public documentation page requires an update for this KPI metadata addition
  • My changes generate no new warnings
  • I have added tests that prove the feature works
  • I have added a changelog fragment under source/isaaclab/changelog.d/
  • I have added my name to CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Aug 28, 2026

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI-generated review (Codex).

Two camera-discovery edge cases should be addressed before merge:

  1. The global visited-object check runs before camera recording. If the same camera config object is referenced from two config paths, only the first path is emitted. The current test codifies this by assigning shared_camera to tiled_camera and duplicate but expecting only tiled_camera. Because the payload is path-based and the PR says it records each camera config path, camera detection should happen before container deduplication so every path is preserved.

  2. Camera identity is matched only through MRO class names CameraCfg and RayCasterCameraCfg. This covers their current subclasses, but an unrelated task class with the same simple name and integer width/height fields is falsely reported, while a future independent camera-config family would be missed. Please use concrete types through a function-local import, or at least match module plus qualified class name.

For clarity: no-camera configurations are handled safely—the helper returns no metadata, so benchmark_info.camera_resolutions is omitted. Two distinct camera config objects are both reported and sorted by path; only aliased references lose the second path.

Suggested focused tests: no camera, two distinct cameras, one camera object referenced at two paths, and an unrelated same-named CameraCfg class.

@yts-nv

yts-nv commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @AntoineRichard , updated for the feedback.

@yts-nv
yts-nv marked this pull request as ready for review August 31, 2026 01:20
@yts-nv
yts-nv requested a review from a team August 31, 2026 01:20
@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds resolved camera dimensions to benchmark KPI metadata after environment configuration overrides are applied.

  • Traverses environment configurations for CameraCfg and RayCasterCameraCfg instances.
  • Adds camera resolution metadata to runtime, startup, training, and play benchmarks across supported RL backends.
  • Adds focused extraction and serialization tests plus a changelog fragment.

Confidence Score: 4/5

The shared-container traversal defect should be fixed before merging so every configured camera path is reported as promised.

Object-identity deduplication occurs before descendant traversal, causing cameras beneath a shared intermediate configuration object to disappear from all but the first reported path.

Files Needing Attention: source/isaaclab/isaaclab/benchmark/capture.py, source/isaaclab/test/benchmark/test_capture.py

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/benchmark/capture.py Adds camera discovery and metadata construction, but shared intermediate containers cause later aliased camera paths to be omitted.
source/isaaclab/test/benchmark/test_capture.py Covers camera types, sorting, omission, and direct camera aliases, but not aliases through shared intermediate containers.
source/isaaclab/test/benchmark/test_benchmark_core.py Confirms nested camera resolution metadata is serialized into benchmark_info.
source/isaaclab/isaaclab/benchmark/entrypoints/runtime.py Adds resolved camera metadata to runtime benchmark workflow metadata after configuration overrides.
source/isaaclab/isaaclab/benchmark/entrypoints/startup.py Adds resolved camera metadata to startup benchmark KPI output.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Resolved environment config] --> B[Traverse config paths]
    B --> C{Camera configuration?}
    C -- Yes --> D[Read resolved width and height]
    C -- No --> E[Traverse child values]
    D --> F[camera_resolutions workflow metadata]
    F --> G[benchmark_info KPI payload]
Loading

Reviews (1): Last reviewed commit: "Merge branch 'develop' into codex/benchm..." | Re-trigger Greptile

Comment thread source/isaaclab/isaaclab/benchmark/capture.py Outdated

@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

The change adds resolved camera dimensions to benchmark KPI metadata across runtime, startup, training, and play entrypoints for RSL-RL, RL-Games, skrl, and SB3. The metadata is omitted when no concrete camera resolution is found.

  • Design and architecture: Camera-config traversal is centralized in benchmark capture alongside existing environment-config inspection. Exact CameraCfg and RayCasterCameraCfg types are recognized, sensor imports remain deferred in production code, and deterministic config paths are emitted for downstream identification.
  • API: The KPI surface gains an additive benchmark_info.camera_resolutions mapping while camera-less payloads retain the existing shape. Existing signatures and metadata keys are unchanged, and a changelog fragment records the user-visible addition.
  • Implementation: The traversal handles direct and pattern-based dimensions, cycles, aliases to camera objects, mappings, sequences, and ordinary config objects. Integration paths were traced after environment overrides and serialization coverage confirms the expected KPI shape. A non-blocking residual limitation is that a non-camera container shared through multiple paths is traversed only through its first path because visitation is identity-based.

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.

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @yts-nv! Should we add this to the schema?

@yts-nv

yts-nv commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @yts-nv! Should we add this to the schema?

Sure! added.

@fatimaanes
fatimaanes enabled auto-merge (squash) September 4, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants