Allow to terminate an epoch without firing Events.EPOCH_COMPLETED#3313
Merged
vfdev-5 merged 9 commits intopytorch:masterfrom Dec 9, 2024
Merged
Allow to terminate an epoch without firing Events.EPOCH_COMPLETED#3313vfdev-5 merged 9 commits intopytorch:masterfrom
Events.EPOCH_COMPLETED#3313vfdev-5 merged 9 commits intopytorch:masterfrom
Conversation
vfdev-5
reviewed
Dec 4, 2024
Collaborator
vfdev-5
left a comment
There was a problem hiding this comment.
Thanks a lot for the PR @bonassifabio !
I left a comment, otherwise it looks good to me
Contributor
Author
|
Thanks @vfdev-5 for the positive feedback! I still want to include some additional test to make sure handlers are working as expected when |
…ion". - Merged flags "should_terminate_single_epoch" and "_skip_epoch_completed_after_termination".
vfdev-5
reviewed
Dec 9, 2024
Collaborator
vfdev-5
left a comment
There was a problem hiding this comment.
Thanks for the update, @bonassifabio !
vfdev-5
approved these changes
Dec 9, 2024
Collaborator
vfdev-5
left a comment
There was a problem hiding this comment.
Few nits, otherwise, it looks good to me!
Thanks a lot for working on this feature!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses #3312
Description
Engine.terminate_epoch()can now be called with the flagskip_epoch_completed=True, which allows to preventEvents.EPOCH_COMPLETEDto be fired after the termination of the epoch.TODOs
skip_epoch_completed=True.Other minor changes
skip_completed_after_terminationintroduced in Give the option to terminate the engine without firing Events.COMPLET… #3309 has been made renamed to_skip_completed_after_terminationto make it private, for consistency with adb2a01