Skip to content

DOC: fix minor docstring grammar in events.py#3783

Merged
vfdev-5 merged 4 commits into
pytorch:masterfrom
importstring:small-refactor
Jun 9, 2026
Merged

DOC: fix minor docstring grammar in events.py#3783
vfdev-5 merged 4 commits into
pytorch:masterfrom
importstring:small-refactor

Conversation

@importstring

Copy link
Copy Markdown
Contributor

This PR fixes a few small docstring grammar issues in ignite/engine/events.py. There are no code or behavior changes, only wording fixes in comments/docstrings.

All changes are minimal and localized, for example:

# Before
"""Single Event containing a filter, specifying whether the event should
be run at the current event (if the event type is correct)

Args:
    value: The actual enum value. Only needed for internal use. Do not touch!
    event_filter: A function taking the engine and the current event value as input and returning a
        boolean to indicate whether this event should be executed. Defaults to None, which will result to a
        function that always returns `True`
    name: The enum-name of the current object. Only needed for internal use. Do not touch!
"""
# After
"""Single event containing a filter specifying whether the handler should be run for the current event (if the event type is correct).

Args:
    value: The actual enum value. Only needed for internal use. Do not touch!
    event_filter: A function taking the engine and the current event value as input and returning a
        boolean to indicate whether this event should be executed. Defaults to None, which will result in a
        function that always returns `True`.
    name: The enum-name of the current object. Only needed for internal use. Do not touch!
"""

The deprecated default event filter docstring is also cleaned up: [is is]

# Before
"""Default event filter. This method is is deprecated and will be removed. Please, use None instead"""

# After
"""Default event filter. This method is deprecated and will be removed. Please use None instead."""

These changes:

  • Fix a duplicated word: is is.
  • Replace “result to” with the correct “result in”.
  • Make the CallableEventWithFilter docstring clearer and grammatically correct.
  • Fixed: "User can also combine events" --> "Users can also ..."

MAINT: fix multiref reducer typo and Rouge error message (pytorch#3781)
Corrected typos and improved clarity in docstrings.
@github-actions github-actions Bot added the module: engine Engine module label Jun 8, 2026

@vfdev-5 vfdev-5 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

@aaishwarymishra

Copy link
Copy Markdown
Collaborator

@importstring Code style checks are failing pls try to use pre-commit hook :)

@importstring

Copy link
Copy Markdown
Contributor Author

@aaishwarymishra Alright done. Let me know if this works!

@vfdev-5
vfdev-5 added this pull request to the merge queue Jun 9, 2026
Merged via the queue into pytorch:master with commit f714577 Jun 9, 2026
22 of 24 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.

3 participants