-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Configure validation frequency #5534
Configure validation frequency #5534
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 @JohnGiorgi, this seems like a good approach. I have a couple comments 👇
class ShouldValidateCallback(TrainerCallback): | ||
""" | ||
A callback that you can pass to the `GradientDescentTrainer` to change the frequency of | ||
validation during training. If `start_validation` is not `None`, validation will not occur until |
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.
I think validation_start
sounds a little better than start_validation
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.
Changed! Yeah, I was struggling with the naming, if you have any other name change suggestions let me know!
Co-authored-by: Pete <epwalsh10@gmail.com>
Co-authored-by: Pete <epwalsh10@gmail.com>
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.
LGTM! Thanks @JohnGiorgi!
Cool! Thanks @epwalsh |
Co-authored-by: Dirk Groeneveld <dirkg@allenai.org>
Fixes #5214 .
Changes proposed in this pull request:
GradientDescentTrainer
(_should_validate_this_epoch
) that controls whether validation will occur at the end of an epoch.ShouldValidateCallback
that allows a user to configure validation frequency.validation_start
) and the validation frequency (withvalidation_interval
).Before submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.After submitting
codecov/patch
reports high test coverage (at least 90%).You can find this under the "Actions" tab of the pull request once the other checks have finished.