Skip to content

Change DataPipe shape validation to rely on maxSize instead of actual size. #716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 20, 2025

Conversation

ehennestad
Copy link
Collaborator

@ehennestad ehennestad commented May 25, 2025

Motivation

Fix #711

How to test the behavior?

Show here how to reproduce the new behavior (can be a bug fix or a new feature)

Todo:

  • Check both maxSize and actual size, and warn if actual size does not match shape constraint
  • Add unittest to specifically test DataPipe shape validation

Checklist

  • Have you ensured the PR description clearly describes the problem and solutions?
  • Have you checked to ensure that there aren't other open or previously closed Pull Requests for the same change?
  • If this PR fixes an issue, is the first line of the PR description fix #XX where XX is the issue number?

Added new function for validating shape of a dataset or attribute value. Extracted a static template portion from fillValidator and added a case for DataPipe values.
Add optional argument to enforce strict check on 1D shapes, i.e not allowing shape (inf, 1) or (1, inf) etc
Extract code "template" to another function that can be called from a validator function. The code template is static and does not need to be duplicated across many classes
@ehennestad ehennestad changed the title Change validation of DataPipe to rely on maxSize instead of actual size Change DataPipe shape validation to rely on maxSize instead of actual size. May 29, 2025
@ehennestad
Copy link
Collaborator Author

Ideally would check both maxSize and actual size, and warn if actual size does not match shave constraint

Fixed bug where maxSize should be explicitly set for DataPipe vector data
Added extra validation of actual size/shape of data pipe objects
Added unit test to test new behavior
Fixed expected warning
@bendichter bendichter marked this pull request as ready for review June 20, 2025 14:31
@ehennestad ehennestad merged commit ffbfdb2 into main Jun 20, 2025
4 of 13 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.

[Bug]: Size validation of data in TimeSeries and TimeSeries-derived classes does not work for DataPipe objects
2 participants