Skip to content

Allow zero-sized validation splits#1003

Merged
pfebrer merged 2 commits into
metatensor:mainfrom
ChaitanyaParate:zero-sized_validation
Jan 21, 2026
Merged

Allow zero-sized validation splits#1003
pfebrer merged 2 commits into
metatensor:mainfrom
ChaitanyaParate:zero-sized_validation

Conversation

@ChaitanyaParate
Copy link
Copy Markdown
Contributor

@ChaitanyaParate ChaitanyaParate commented Jan 9, 2026

Fixes #999

The BaseHypers schema rejected validation_set values of 0 or 0.0 due to a strict >0 constraint, even though the training pipeline already supports empty splits. This change relaxes the constraint to >=0 while still rejecting negative values.


📚 Documentation preview 📚: https://metatrain--1003.org.readthedocs.build/en/1003/

@pfebrer pfebrer force-pushed the zero-sized_validation branch from 9fa9ee1 to 3f0a816 Compare January 21, 2026 09:35
Copy link
Copy Markdown
Contributor

@pfebrer pfebrer left a comment

Choose a reason for hiding this comment

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

Thanks! I think this doesn't solve the linked issue, but it for sure fixes a bug 👍 I think previously validation sets of 0 weren't allowed, and then we forgot to update this when we allowed them.

@pfebrer
Copy link
Copy Markdown
Contributor

pfebrer commented Jan 21, 2026

cscs-ci run

Validation sets of 0.0 are now allowed, change the tests to
reflect that.
@pfebrer
Copy link
Copy Markdown
Contributor

pfebrer commented Jan 21, 2026

cscs-ci run

@pfebrer pfebrer merged commit 05db589 into metatensor:main Jan 21, 2026
17 checks passed
@pfebrer pfebrer mentioned this pull request Jan 22, 2026
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.

[FEATURE] Allow 0 (instead of 0.0) as a validation/test set size

2 participants