Skip to content

rocAL Unit test fix#427

Merged
kiritigowda merged 14 commits intoROCm:developfrom
fiona-gladwin:python_ut_fix
Jan 6, 2026
Merged

rocAL Unit test fix#427
kiritigowda merged 14 commits intoROCm:developfrom
fiona-gladwin:python_ut_fix

Conversation

@fiona-gladwin
Copy link
Copy Markdown
Contributor

@fiona-gladwin fiona-gladwin commented Dec 10, 2025

Motivation

This PR fixes unit tests for the Python API by correcting data paths, API parameters, and test names to align with updated functionality.

Technical Details

  • Updated lens_correction to accept either single parameters (replicated across batch) or per-image parameters
  • Fixed the lens correction python API
  • Updated test data paths and API parameters to match current implementation for Webdataset test case
  • Corrected test output names for clarity

Test Plan

Test Result

rocAL C++ and python unit test :

INFO:root:Failing cases: FishEye_rgb_hip.png, Blur_rgb_hip.png, Blur_gray_host.png, FishEye_gray_hip.png, Blur_rgb_host.png, Blur_gray_hip.png

Submission Checklist

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes unit test failures in the rocAL Python and C++ APIs by correcting data paths, API parameters, and test output names to align with the current implementation.

Key changes:

  • Enhanced lens correction API to accept both single parameters (replicated across batch) and per-image parameters
  • Fixed web dataset reader configuration with correct file extensions and API parameters
  • Corrected test output names for better clarity

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/python_api/unit_tests.sh Updated web dataset path to include tar_file subdirectory
tests/python_api/unit_test.py Fixed web dataset reader parameters, added missing vignette parameter, and updated lens correction to use camera matrix and distortion coefficients
tests/cpp_api/unit_tests/testAllScripts.sh Corrected test output names to include "Random" suffix and added missing ResizeMirrorNormalize test
rocAL_pybind/amd/rocal/fn.py Enhanced lens_correction function to handle both single and per-image parameter configurations
rocAL/source/augmentations/geometry_augmentations/node_lens_correction.cpp Implemented parameter replication logic for single camera matrix and distortion coefficients
rocAL/source/api/rocal_api_augmentation.cpp Updated validation to allow size of 1 for camera matrix and distortion coefficients with improved error messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/python_api/unit_test.py
Comment thread tests/python_api/unit_test.py Outdated
Comment thread rocAL_pybind/amd/rocal/fn.py
Comment thread rocAL_pybind/amd/rocal/fn.py
fiona-gladwin and others added 3 commits December 10, 2025 16:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread tests/python_api/unit_test.py
Comment thread tests/python_api/unit_test.py
Copy link
Copy Markdown
Collaborator

@rrawther rrawther left a comment

Choose a reason for hiding this comment

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

please address the comments

Comment thread tests/python_api/unit_test.py
@kiritigowda kiritigowda merged commit b8cdedf into ROCm:develop Jan 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants