Skip to content

Conversation

@koparasy
Copy link
Member

No description provided.

Copy link

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 refactors the layout transformation system by replacing the abstract test implementation with a concrete PointwiseConcatTransform implementation and comprehensive tests. The changes introduce better error handling through typed return values and add support for field-to-column mapping via an IndexMap structure.

Key Changes:

  • Introduces PointwiseConcatTransform class that concatenates tensor fields into a single matrix for ML model input
  • Updates LayoutTransform interface to return AMSExpected<IndexMap> from pack() and AMSStatus from unpack() for better error handling
  • Adds comprehensive test coverage with 8 test cases covering both success scenarios and error conditions

Reviewed changes

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

Show a summary per file
File Description
tests/AMSlib/wf/pointwise_layout_transform.cpp New test file with 8 test cases covering pack/unpack operations, uncertainty handling, and error conditions
tests/AMSlib/wf/layout_transform.cpp Removed old dummy test implementation
tests/AMSlib/wf/CMakeLists.txt Updated test registration to use new pointwise test suite
src/AMSlib/wf/pointwise_layout_transform.hpp New concrete implementation of LayoutTransform with field concatenation logic
src/AMSlib/wf/index_map.hpp New struct defining field-to-column mappings for tensor transformations
src/AMSlib/wf/layout_transform.hpp Updated interface with typed error returns and reference-based output parameters
src/AMSlib/include/AMSError.hpp Added InvalidShapes error type for tensor dimension mismatches

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

Copy link
Member

@lpottier lpottier left a comment

Choose a reason for hiding this comment

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

LGTM. The concept of LayoutTransform and IndexMap is good but will require exhaustive documentation with examples.

@koparasy
Copy link
Member Author

LGTM. The concept of LayoutTransform and IndexMap is good but will require exhaustive documentation with examples.

Thank you. I am planning to add more documentation. I will start doing it after I get an end to end example working with this. I am also suspecting I have bugs in my overall logic. So I need this end-to-end example to fix/simplify components.

@koparasy koparasy merged commit 11682d6 into develop Dec 17, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants