Add has_registered_events method to Engine class#3449
Merged
vfdev-5 merged 5 commits intopytorch:masterfrom Sep 11, 2025
Merged
Add has_registered_events method to Engine class#3449vfdev-5 merged 5 commits intopytorch:masterfrom
vfdev-5 merged 5 commits intopytorch:masterfrom
Conversation
vfdev-5
reviewed
Sep 9, 2025
Collaborator
vfdev-5
left a comment
There was a problem hiding this comment.
Thanks for the quick PR @JeevanChevula
Please also write tests with built-in events in test_engine.py and custom events in test_custom_events.py
vfdev-5
approved these changes
Sep 9, 2025
Collaborator
vfdev-5
left a comment
There was a problem hiding this comment.
LGTM, thanks @JeevanChevula !
Let's see if the CI is passing (we can have some unrelated failure on the CI)
Collaborator
Contributor
Author
|
Fixed formatting issues |
Contributor
Author
|
I investigated the CI failures and found the error message 'Please remove this workaround and restore dataset check.' appearing in all failed runs. I'm unsure of the exact cause, but I believe this may be an error independent of the PR functionality, as it appears to be related to Caltech101 dataset handling rather than the Engine method implementation |
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.
Adds a new method
has_registered_events(event) -> boolto the Engine class to check whether a specific event is registered with the engine.This method will be used by the Checkpoint handler to determine if custom events need to be registered, improving separation of concerns between Engine and Checkpoint classes.
Related to PR #3440 (checkpoint events feature)