Skip to content
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

Fix NaN bug in validation #59

Merged
merged 4 commits into from
Oct 8, 2024
Merged

Conversation

louisPoulain
Copy link
Collaborator

As stated in #58, the Dataset.drop_nans method only drop NaN values, but does not drop Inf or -Inf values.
I propose a simple change in the method to avoid having the issue again. It consists in checking for Inf values at the same time via the isfinite method.

@louisPoulain louisPoulain linked an issue Oct 7, 2024 that may be closed by this pull request
@louisPoulain louisPoulain marked this pull request as ready for review October 8, 2024 07:00
@louisPoulain louisPoulain requested a review from dnerini October 8, 2024 07:00
Copy link
Member

@dnerini dnerini left a comment

Choose a reason for hiding this comment

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

thanks @louisPoulain , the new approach is clearly more robust.
I have only some concerns with respect to all the additional log messages, see my comments

mlpp_lib/datasets.py Outdated Show resolved Hide resolved
mlpp_lib/datasets.py Outdated Show resolved Hide resolved
mlpp_lib/datasets.py Outdated Show resolved Hide resolved
@louisPoulain louisPoulain requested a review from dnerini October 8, 2024 09:02
@dnerini dnerini merged commit 08b5a4d into main Oct 8, 2024
2 checks passed
@louisPoulain louisPoulain deleted the 58-val_loss-nan-for-any-training branch October 21, 2024 09:58
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.

Val_loss NaN for any training
2 participants