Python ut fix#19
Open
fiona-gladwin wants to merge 18 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes unit tests for the Python API by correcting data paths, API parameters, and test names to align with updated functionality. The changes ensure tests properly exercise the lens_correction augmentation with valid parameters and support both single and batch modes for camera matrices and distortion coefficients.
Key changes:
- Enhanced
lens_correctionto accept either single parameters (replicated across batch) or per-image parameters - Updated test data paths and API parameters to match current implementation
- Corrected test output names for clarity
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no 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 webdataset reader parameters (extension and path parameter name), added missing vignette parameter, updated lens_correction to use proper camera/distortion parameters |
| 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 | Refactored lens_correction to support both single and batch modes for camera_matrix and distortion_coeffs parameters |
| rocAL/source/augmentations/geometry_augmentations/node_lens_correction.cpp | Added logic to replicate single parameter sets across batch or validate batch-sized parameters |
| rocAL/source/api/rocal_api_augmentation.cpp | Removed strict batch size validation that prevented single parameter mode |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ocs/sphinx (ROCm#426) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.30.1 to 1.31.0. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/v1.31.0/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.30.1...v1.31.0) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.31.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Use enums present in commons.h Remove the usage of API enums in internal node files * Remove unused include rocal_api_types.h * Introduce EnumRegistry Add support to register all internal enums * Introduce Argument class Creates an argument instance for each arg passed in the Node Handles different argument types i.e parameters, vectors, enums and predefined types * Introduce PipelineOperator class * Add support to create and return node name and tensor name * Add support in MasterGraph to store details of PipelineOperators * Add support to store the argument details in the node for brightness and ImageLoaderNode * Introduce PipelineSerializer Add support to serialize the args and pipeline details Add support to serialize the tensors. * Introduce external rocalSerialize API * Remove redundant static cast Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove semicolon for enum macro * Modify name of macro * Change enums to scoped enums in commons.h * Code reorganization Create single constructor with check for different data types in Argument class * Minor fix * Remove unused includes * Add compiler keywords * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor change * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor change * Fix shared pointer fetching * Minor fix * Minor fix * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CHANGELOG.md * Update CHANGELOG.md * Add all serialization code to pipeline serializer Remove the use of pipeline operator * Revert fix * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Add comments and doc description * Support to serialize to file * Update CMakeLists version for rocAL * Update CHANGELOG * Update CHANGELOG.md * Minor change * Minor changes * Update CHANGELOG.md Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com> * Add const qualifier * Add const correctness to get args list * Add const correctness to get args list * Minor change * Add const correctness to get args list * Minor change * Return serialized string reference from MasterGraph * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Obtain serialized string size as ptr * Minor change * Add reset for pipeline serializer * Add cstring include * Minor change * Update CHANGELOG * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor changes * Remove Params proto * Update CHANGELOG * Change rocal proto file to proto2 features * Generate UID for tensors from MasterGraph * Minor change * Resolve copilot review comments * Minor change * Resolve copilot review comments * Minor changes - review comments * Revert input and outputs * Use uint64 in proto for pipeline members * Revert "Revert input and outputs" This reverts commit 72ff657. * Minor changes * Return tensor name as reference * Remove type string from InputOutput proto * Add support to store and fetch seed value in proto * Remove serialize to file * Update CHANGELOG --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com> Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com> Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
…OCm#411) * Use enums present in commons.h Remove the usage of API enums in internal node files * Remove unused include rocal_api_types.h * Introduce EnumRegistry Add support to register all internal enums * Introduce Argument class Creates an argument instance for each arg passed in the Node Handles different argument types i.e parameters, vectors, enums and predefined types * Introduce PipelineOperator class * Add support to create and return node name and tensor name * Add support in MasterGraph to store details of PipelineOperators * Add support to store the argument details in the node for brightness and ImageLoaderNode * Introduce PipelineSerializer Add support to serialize the args and pipeline details Add support to serialize the tensors. * Introduce external rocalSerialize API * Add support to serialize parameter arguments * Remove redundant static cast Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Remove semicolon for enum macro * Modify name of macro * Change enums to scoped enums in commons.h * Code reorganization Create single constructor with check for different data types in Argument class * Minor fix * Remove unused includes * Add compiler keywords * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor change * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update rocAL/include/pipeline/argument.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor change * Fix shared pointer fetching * Minor fix * Minor fix * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CHANGELOG.md * Update CHANGELOG.md * Add all serialization code to pipeline serializer Remove the use of pipeline operator * Revert fix * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Add comments and doc description * Support to serialize to file * Update CMakeLists version for rocAL * Update CHANGELOG * Update CHANGELOG.md * Minor change * Minor changes * Update CHANGELOG.md Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com> * Add const qualifier * Add const correctness to get args list * Add const correctness to get args list * Minor change * Add const correctness to get args list * Minor change * Return serialized string reference from MasterGraph * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Obtain serialized string size as ptr * Minor change * Add reset for pipeline serializer * Add cstring include * Minor change * Update CHANGELOG * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor changes * Add empty lines in between functions * Remove Params proto * Add params proto * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Minor changes * Update CHANGELOG * Update CHANGELOG * Change rocal proto file to proto2 features * Generate UID for tensors from MasterGraph * Minor change * Resolve copilot review comments * Minor change * Resolve copilot review comments * Use uint64 in proto for pipeline members * Resolve review comments * Minor changes - review comments * Add error check statements * Revert input and outputs * Use uint64 in proto for pipeline members * Revert "Revert input and outputs" This reverts commit 72ff657. * Minor changes * Return tensor name as reference * Remove type string from InputOutput proto * Add support to store and fetch seed value in proto * Remove serialize to file * Update CHANGELOG * Add period in throw statements --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Fiona Gladwin <121928245+fgladwin@users.noreply.github.com> Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com> Co-authored-by: spolifroni-amd <Sandra.Polifroni@amd.com> Co-authored-by: Lakshmi Kumar <lakshmi.kumar@amd.com>
…ocs/sphinx (ROCm#428) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.31.0 to 1.31.1. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.31.0...v1.31.1) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-version: 1.31.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.