-
Notifications
You must be signed in to change notification settings - Fork 5
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
Account for empty validation and test sets #152
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks also for the tests
Unfortunately no because the user can also specify their own validation set instead of using fractions |
I don't see how a dataset can be empty if successfully read something from disk? |
Hmm ok, then that's an issue because, in my opinion, we should allow empty validation sets, as long as they aren't all empty. Perhaps this should be allowed in a different PR though |
How do you think would the syntax for something like this look like? |
I don't yet know if and how we should allow it. Perhaps we should discuss it with the whole crew. For now, I will go with your suggestions |
src/metatensor/models/cli/train.py
Outdated
@@ -305,7 +305,7 @@ def _train_model_hydra(options: DictConfig) -> None: | |||
validation_size = validation_options | |||
train_size -= validation_size | |||
|
|||
if validation_size < 0 or validation_size >= 1: | |||
if validation_size <= 0 or validation_size >= 1: | |||
raise ValueError("Validation set split must be between 0 and 1.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise ValueError("Validation set split must be between 0 and 1.") | |
raise ValueError("Validation set split must be larger than 0 and smaller than 1.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then also for the training set...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MERGE!!!!!
Closes #96
📚 Documentation preview 📚: https://metatensor-models--152.org.readthedocs.build/en/152/