Check coefficient consistency for existing HDF5 files#194
Open
Check coefficient consistency for existing HDF5 files#194
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds coefficient consistency checking for HDF5 files before appending new data, addressing issue #192. The implementation adds a new CheckH5Params() virtual method to the Coefs base class and implements it across all coefficient types to validate parameter consistency.
Key Changes:
- Added
CheckH5Params()method to validate coefficient dimensions, scale parameters, and force types before extending HDF5 files - Implemented shape validation during coefficient reading to skip inconsistently ranked data
- Added Python bindings for the new
CheckH5Params()method across all coefficient wrapper classes
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 24 comments.
| File | Description |
|---|---|
| expui/Coefficients.H | Declares pure virtual CheckH5Params() method in base Coefs class and derived classes |
| expui/Coefficients.cc | Implements CheckH5Params() for all coefficient types, adds parameter validation in ExtendH5Coefs(), and adds shape checking during coefficient reading |
| pyEXP/CoefWrappers.cc | Adds pybind11 override declarations for CheckH5Params() method in all Python wrapper classes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
6 tasks
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4 tasks
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
[WIP] Address coefficient consistency check for HDF5 files
[WIP] Address feedback on coefficient consistency for HDF5 files
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
Summary
Check consistency of existing HDF5 before appending coefficients. This address issue #192.
Strategy
Coefs::ExtendH5Coefs()calls the overridden member functionCheckH5Params()to check whether the current coefficient dimensions, scale parameters, and force type is consistent with those in the file. Throws an exception on mismatch.Notes
Compiles but only partly tested.