Skip to content

Log VideoRecorder cubric warning once per recorder - #7633

Closed
klakhi wants to merge 1 commit into
isaac-sim:release/3.0.0from
klakhi:fix/video-recorder-cubric-warn-once
Closed

klakhi wants to merge 1 commit into
isaac-sim:release/3.0.0from
klakhi:fix/video-recorder-cubric-warn-once

Conversation

@klakhi

@klakhi klakhi commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

VideoRecorder logs the Kit/Newton "requires cubric" warning from
_frame_from_visualizer(), which _get_frame() calls on every captured frame. The
warning has no once-only guard, so it repeats once per frame for the entire clip and
buries all other console output.

Observed on release/3.0.0 with Isaac Sim 6.1.0rc26 on Windows — roughly 120 identical
lines in 12 seconds before the run was interrupted; a full --video_length 200 run emits
~200 copies:

uv run isaaclab play --rl_library rl_games --task Isaac-Cartpole-Camera-Direct \
  --checkpoint pretrained --video --video_length 200 --visualizer kit,newton_gl,rerun,viser
[Warning] [isaaclab.envs.utils.video_recorder] [VideoRecorder] source='visualizer:kit' with Newton physics requires cubric to propagate Fabric transforms to RTX. Frames may be black if cubric is unavailable. Use source='visualizer:newton' for guaranteed capture.
... x ~120, one per captured frame ...

The condition being reported — viz_type == "kit" and
physics_manager.video_capture_backend() == "newton_gl" — is fixed configuration state
that cannot change between frames, so re-logging it per frame carries no new information.

This change adds a self._cubric_warning_logged flag and gates the warning on it,
mirroring the once-only self._frame_error_logged guard that the same class already uses
for its frame-capture error path.

Behavior is otherwise unchanged: the warning text is byte-identical, it still fires on the
first frame, capture is still attempted on every frame, and the flag is per-recorder so a
second recorder stream still warns.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Release backport

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

Screenshots

N/A — console output only; before/after line counts are given above.

Checklist

Docker and GPU tests run on demand. Push the commits you want tested, then
comment run-ci on the pull request.

  • 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 added a changelog fragment under source/<pkg>/changelog.d/ for every touched package (do not edit CHANGELOG.rst or bump extension.toml — CI handles that)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

Test coverage

Extended the existing test_kit_visualizer_newton_physics_logs_warning rather than adding
a new case: it now drives five captures and asserts exactly one warning while all five
frames are still captured. The test fails on the current code (5 warnings) and passes with
this change (1 warning).

Documentation

No documentation change is required. docs/source/features/record_video.rst already
describes this case as "a warning is logged" (singular), which this change makes accurate
rather than contradicting. No public API, signature, or cfg field is touched.

@klakhi
klakhi requested a review from a team September 8, 2026 08:08
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Sep 8, 2026

@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

This PR adds a per-recorder _cubric_warning_logged guard so the Kit/Newton cubric warning is emitted only on the first applicable capture while frame capture continues normally.

  • Design and architecture: The new private flag follows the recorder's existing once-only logging pattern and is scoped per VideoRecorder, preserving a warning for each independent recorder while suppressing repeats across frames and clips. It is set only after the Newton GL backend condition is confirmed.
  • API: No public API, configuration, source parsing, defaults, or return types change. The warning text remains unchanged, and the user-visible fix has an appropriately placed package changelog fragment.
  • Implementation: The capture path from step() through _get_frame() to _frame_from_visualizer() remains intact; only repeated backend probes and warning emissions are skipped after the first matching warning. The closest existing test now verifies one warning over five captures and confirms all five render calls still occur.

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.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR prevents the Kit/Newton cubric warning from being repeated for every captured frame.

  • Adds a per-recorder guard around the warning while preserving frame capture.
  • Extends the existing test to exercise repeated captures and verify a single warning.
  • Adds the required changelog fragment.

Confidence Score: 4/5

The implementation appears safe to merge, with only a non-blocking gap in coverage of independent recorder instances.

The instance-level guard correctly preserves first-frame warning emission and all subsequent captures; the remaining concern is that the test does not protect the documented per-recorder boundary.

Files Needing Attention: source/isaaclab/test/envs/test_video_recorder.py

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/envs/utils/video_recorder.py Adds an instance-level flag that suppresses duplicate cubric warnings after the first qualifying frame.
source/isaaclab/test/envs/test_video_recorder.py Verifies one warning across five captures, but does not verify that a second recorder warns independently.
source/isaaclab/changelog.d/video-recorder-cubric-warn-once.rst Documents the corrected once-per-recorder warning behavior.

Reviews (1): Last reviewed commit: "Log VideoRecorder cubric warning once pe..." | Re-trigger Greptile

Comment on lines +263 to +264
cubric_warnings = [r for r in caplog.records if "source='visualizer:newton'" in r.message]
assert len(cubric_warnings) == 1

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.

P2 Per-recorder scope untested

This test verifies suppression across five frames from one VideoRecorder, but it does not verify that a second recorder emits its own warning. A class-level or global guard would still pass, allowing a regression that suppresses warnings for later recorder streams. Please create a second recorder and assert that it emits another warning.

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

looks good, thank you

@kellyguo11

Copy link
Copy Markdown
Contributor

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Sep 9, 2026
kellyguo11 added a commit that referenced this pull request Sep 9, 2026
# Description

Forward-ports #7633 from `release/3.0.0` to `develop`.

`VideoRecorder` logs the Kit/Newton "requires cubric" warning from
`_frame_from_visualizer()`, which is called on every captured frame.
Because the condition is fixed recorder configuration state, repeating
the warning once per frame floods the terminal without adding
information.

This change adds a per-recorder guard so the warning is emitted on the
first applicable capture only. Frame capture continues on every frame,
the warning text is unchanged, and each independent recorder still emits
its own warning.

The original commit by @klakhi is preserved. The test also covers a
second recorder instance, addressing the review feedback on #7633.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

Existing release PR: #7633

## Screenshots

N/A — console-output behavior only.

## Validation

- Regression test on unmodified `upstream/develop`: failed as expected
with 6 warnings instead of 2.
- `PYTHONPATH=source/isaaclab:source/isaaclab_visualizers uv run
--no-project --with pytest --with numpy --with torch --with gymnasium
--with lazy-loader --with warp-lang --with 'moviepy<2' python -m pytest
source/isaaclab/test/envs/test_video_recorder.py -q` — 33 passed.
- Changelog fragment gate — passed against the current
`upstream/develop`.
- `uv run --no-project --with-editable ./source/isaaclab --with
pre-commit isaaclab -f` — passed all hooks.

## 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 with `uv run isaaclab -f`
- [x] I have made corresponding changes to the documentation (none
required; no public API or documented behavior changed)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] The original contributor already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Krishna Lakhi <[email protected]>
isaaclab-bot Bot pushed a commit that referenced this pull request Sep 9, 2026
# Description

Forward-ports #7633 from `release/3.0.0` to `develop`.

`VideoRecorder` logs the Kit/Newton "requires cubric" warning from
`_frame_from_visualizer()`, which is called on every captured frame.
Because the condition is fixed recorder configuration state, repeating
the warning once per frame floods the terminal without adding
information.

This change adds a per-recorder guard so the warning is emitted on the
first applicable capture only. Frame capture continues on every frame,
the warning text is unchanged, and each independent recorder still emits
its own warning.

The original commit by @klakhi is preserved. The test also covers a
second recorder instance, addressing the review feedback on #7633.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

Existing release PR: #7633

## Screenshots

N/A — console-output behavior only.

## Validation

- Regression test on unmodified `upstream/develop`: failed as expected
with 6 warnings instead of 2.
- `PYTHONPATH=source/isaaclab:source/isaaclab_visualizers uv run
--no-project --with pytest --with numpy --with torch --with gymnasium
--with lazy-loader --with warp-lang --with 'moviepy<2' python -m pytest
source/isaaclab/test/envs/test_video_recorder.py -q` — 33 passed.
- Changelog fragment gate — passed against the current
`upstream/develop`.
- `uv run --no-project --with-editable ./source/isaaclab --with
pre-commit isaaclab -f` — passed all hooks.

## 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 with `uv run isaaclab -f`
- [x] I have made corresponding changes to the documentation (none
required; no public API or documented behavior changed)
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] The original contributor already exists in `CONTRIBUTORS.md`

---------

Co-authored-by: Krishna Lakhi <[email protected]>

(cherry picked from commit b7f66e7)
@kellyguo11

Copy link
Copy Markdown
Contributor

merged and cherry picked in #7657

@kellyguo11 kellyguo11 closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants