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 early stopping code in dfencoder to use average loss of batches in validation set #908

Conversation

hsin-c
Copy link
Contributor

@hsin-c hsin-c commented Apr 26, 2023

Description

This PR fixes the early stopping code in dfencoder to use the average loss of all batches in the validation set, instead of just the net loss of the last batch. This change will ensure that the early stopping criteria are more representative of the entire validation set, rather than relying on a potentially unrepresentative subset of the data.

closes #905

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@hsin-c hsin-c requested a review from a team as a code owner April 26, 2023 00:20
@hsin-c hsin-c added bug Something isn't working non-breaking Non-breaking change 3 - Ready for Review labels Apr 26, 2023
Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Can you add a test that verifies if early stopping is working correctly?

@hsin-c
Copy link
Contributor Author

hsin-c commented May 2, 2023

Can you add a test that verifies if early stopping is working correctly?

Added testing for early stopping. (Providing coverage for the early-stopping code in general, not testing the change in this PR specifically as it's a logic update on the data science side).

Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Thanks for adding that test

@hsin-c hsin-c self-assigned this May 8, 2023
@mdemoret-nv
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit 31b6748 into nv-morpheus:branch-23.07 May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: dfencoder early stopping code using last batch's loss instead of average loss of the epoch
2 participants