-
-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to terminate an epoch without firing
Events.EPOCH_COMPLETED
(#…
…3313) * Added optional flag skip_epoch_completed to Engine.terminate_epoch() * Improved docs for terminate() and terminate_epoch() * Make the internal attribute skip_completed_after_termination private * - Merged flags "should_terminate" and "_skip_completed_after_termination". - Merged flags "should_terminate_single_epoch" and "_skip_epoch_completed_after_termination". * Union[bool, str] instead of the pipe operator for compatibility with older Python versions * Raise an RuntimeError when terminate_epoch() is called on Events.STARTED or Events.EPOCH_STARTED * Ignoring comparison-overlap warning from mypy to keep the code simple * Apply suggestions from code review * Update engine.py --------- Co-authored-by: vfdev <vfdev.5@gmail.com>
- Loading branch information
1 parent
6f8ad2a
commit b636374
Showing
3 changed files
with
119 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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