Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bonassifabio
Copy link
Contributor

This pull request addresses #3312

Description

Engine.terminate_epoch() can now be called with the flag skip_epoch_completed=True, which allows to prevent Events.EPOCH_COMPLETED to be fired after the termination of the epoch.

TODOs

  • Adapt existing tests
  • Add new tests to ensure that handlers behave as expected when an epoch is terminated with the flag skip_epoch_completed=True.
  • Documentation is updated (if required)

Other minor changes

@github-actions github-actions bot added the module: engine Engine module label Dec 4, 2024
Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the PR @bonassifabio !
I left a comment, otherwise it looks good to me

@bonassifabio
Copy link
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 terminate_epoch(True) is called.

…ion".

- Merged flags "should_terminate_single_epoch" and "_skip_epoch_completed_after_termination".
Copy link
Collaborator

@vfdev-5 vfdev-5 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 the update, @bonassifabio !

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Few nits, otherwise, it looks good to me!
Thanks a lot for working on this feature!

@vfdev-5 vfdev-5 enabled auto-merge (squash) December 9, 2024 13:18
@vfdev-5 vfdev-5 merged commit b636374 into pytorch:master Dec 9, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: engine Engine module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants