Skip to content

Fix the default log file path of OVRTX renderer#5749

Merged
pbarejko merged 4 commits into
isaac-sim:developfrom
huidongc:ovrtx-renderer-logging
May 22, 2026
Merged

Fix the default log file path of OVRTX renderer#5749
pbarejko merged 4 commits into
isaac-sim:developfrom
huidongc:ovrtx-renderer-logging

Conversation

@huidongc
Copy link
Copy Markdown
Collaborator

@huidongc huidongc commented May 22, 2026

Description

  • The default log file path of OVRTX renderer uses /tmp/ovrtx_renderer.log which is Linux specific. We need to use a cross-platform temp directory instead.
  • Redirect OVRTX renderer log to stdout for rendering tests so that we can view what is going on with CI, e.g. time for shader compilation will be visible in the CI logs, see rendering-correctness test job (https://github.com/isaac-sim/IsaacLab/actions/runs/26287973633/job/77380393480?pr=5749):
2026-05-22T12:41:09Z [376,470ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 30 seconds so far
2026-05-22T12:41:39Z [406,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 60 seconds so far
2026-05-22T12:42:09Z [436,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 90 seconds so far
2026-05-22T12:42:39Z [466,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 120 seconds so far
2026-05-22T12:43:09Z [496,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 150 seconds so far
2026-05-22T12:43:39Z [526,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 180 seconds so far
2026-05-22T12:44:09Z [556,471ms] [Info] [omni.rtx] Waiting for compilation of ray tracing shaders for RTX renderer main raytracing pipeline by GPU driver: 210 seconds so far
2026-05-22T12:44:16Z [563,300ms] [Info] [omni.rtx] Ray tracing shader compilation for RTX renderer main raytracing pipeline finished after 216 seconds

Type of change

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

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 May 22, 2026
@huidongc huidongc requested a review from pbarejko May 22, 2026 12:33
Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot

Summary

This PR fixes a cross-platform compatibility issue with the OVRTX renderer log file path. The fix replaces the hardcoded Linux-specific /tmp/ovrtx_renderer.log with a cross-platform solution using Python's tempfile.gettempdir(). Additionally, it redirects OVRTX renderer logs to stdout during CI tests for better visibility.


🏗️ Architecture & Design Review

Cross-platform temp directory (✅ Excellent)

  • Using tempfile.gettempdir() is the correct cross-platform approach
  • This returns C:\\Users\\<user>\\AppData\\Local\\Temp on Windows and /tmp on Linux/macOS
  • The import statements are properly organized at module level

Stdout redirection for tests (✅ Well-designed)

  • The _redirect_ovrtx_renderer_log_to_stdout() helper is well-structured
  • Uses /dev/stdout on Unix and CON on Windows - both are valid approaches for platform-specific stdout redirection
  • The function properly walks both direct env (tiled_camera) and manager-based env (scene.base_camera, scene.wrist_camera) patterns

🔇 Silent Failure Analysis

Potential edge cases:

  1. Renderer type check (Lines 304-305 in rendering_test_utils.py): The check getattr(renderer_cfg, "renderer_type", None) == "ovrtx" is safe and will silently skip non-OVRTX renderers as intended.

  2. Missing attributes: The code uses getattr(..., None) defensively throughout, which prevents AttributeError exceptions. This is appropriate for config inspection.

  3. Windows CON device: Using CON as a pseudo-file for stdout on Windows is a valid special device name. However, note that some environments (like certain CI runners) may have restrictions on console device access. If this becomes an issue, an alternative would be NUL for discarding logs or a real temp file.


🧪 Test Coverage Assessment

What's covered:

  • The PR adds OVRTX log redirection to all three rendering test functions: rendering_test_shadow_hand, rendering_test_cartpole, and rendering_test_dexsuite_kuka
  • The redirect is conditionally applied only when renderer == "ovrtx_renderer"

What could be improved:

  • No explicit unit test for _redirect_ovrtx_renderer_log_to_stdout() itself, but this is acceptable given it's an internal test utility function
  • The existing rendering tests will exercise this code path when run with OVRTX renderer

📋 Minor Observations

  1. Docstring clarity (Line 283-287): The docstring clearly explains the purpose and the platform-specific behavior. Well documented!

  2. Changelog fragment: Present and correctly describes the fix.

  3. Skip file for isaaclab_tasks: The .skip file is present as expected when changes don't require a changelog entry for that package.


✅ Verdict

This is a clean, well-thought-out fix for a genuine cross-platform compatibility issue. The implementation follows Python best practices and the test infrastructure changes improve CI observability.

CI Status: Several checks are still pending. Recommend waiting for CI to complete before merging.


🤖 Review generated by Isaac Lab Review Bot | Commit: 0add0a0

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 22, 2026

Greptile Summary

This PR fixes the OVRTX renderer's default log file path to use tempfile.gettempdir() instead of the Linux-specific /tmp, and adds a helper to redirect those logs to stdout during rendering tests for CI visibility.

  • ovrtx_renderer_cfg.py: Default log_file_path now uses os.path.join(tempfile.gettempdir(), "ovrtx_renderer.log"), making the config portable across Windows, Linux, and macOS.
  • rendering_test_utils.py: Adds _redirect_ovrtx_renderer_log_to_stdout, which is called at the start of the three rendering test functions (shadow_hand, cartpole, dexsuite_kuka) to point the OVRTX log file at /dev/stdout (Linux) or CON (Windows), surfacing shader compilation timing and other renderer output in CI logs.

Confidence Score: 4/5

Safe to merge; changes are narrowly scoped to the log file path default and a test-only stdout redirect helper.

The config fix is correct and strictly improves portability. The new _redirect_ovrtx_renderer_log_to_stdout helper works for the three test functions it is wired into, but it walks a fixed list of camera attribute names, so any future test that uses a differently-named camera will silently miss the redirect without a clear signal. The docstring also slightly overstates what pytest captures vs. what becomes visible in CI logs. Neither issue affects current functionality.

source/isaaclab_tasks/test/rendering_test_utils.py — the hardcoded camera attribute list in _redirect_ovrtx_renderer_log_to_stdout is worth revisiting when new rendering tests are added.

Important Files Changed

Filename Overview
source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py Replaces hardcoded /tmp/ovrtx_renderer.log with os.path.join(tempfile.gettempdir(), "ovrtx_renderer.log") for cross-platform compatibility; default is evaluated at import time rather than lazily at instance creation.
source/isaaclab_tasks/test/rendering_test_utils.py Adds _redirect_ovrtx_renderer_log_to_stdout to pipe OVRTX renderer output to stdout in CI; walks a fixed set of camera attribute names, which may not cover future test camera configs.
source/isaaclab_ov/changelog.d/huidongc-ovrtx-renderer-logging.rst Changelog entry documenting the cross-platform temp directory fix.
source/isaaclab_tasks/changelog.d/huidongc-ovrtx-renderer-logging.skip Empty skip marker indicating no changelog entry is required for the isaaclab_tasks package.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[rendering_test_shadow_hand / cartpole / dexsuite_kuka] --> B{renderer == ovrtx_renderer?}
    B -- Yes --> C[_redirect_ovrtx_renderer_log_to_stdout]
    B -- No --> E[Continue with default log_file_path]
    C --> D{Walk camera cfgs\ntiled_camera / base_camera / wrist_camera}
    D --> F{renderer_cfg.renderer_type == 'ovrtx'?}
    F -- Yes --> G[Set log_file_path = /dev/stdout or CON]
    F -- No --> H[Skip]
    G --> I[OVRTX renderer writes logs to stdout]
    I --> J[Logs visible in CI output]
    E --> K[OVRTXRendererCfg default\nos.path.join tempfile.gettempdir, ovrtx_renderer.log]
Loading

Reviews (1): Last reviewed commit: "changelog fragment" | Re-trigger Greptile

Comment thread source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer_cfg.py
Comment thread source/isaaclab_tasks/test/rendering_test_utils.py
Comment thread source/isaaclab_tasks/test/rendering_test_utils.py
@pbarejko pbarejko merged commit 0a9bb26 into isaac-sim:develop May 22, 2026
114 of 117 checks passed
@huidongc huidongc deleted the ovrtx-renderer-logging branch May 23, 2026 03:55
huidongc added a commit that referenced this pull request May 25, 2026
# Description

Cherry-picked PR #5749 from `develop`.

## Type of change

- 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
- [x] 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
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.

2 participants