Skip to content

refactor: update type hints to use Python 3.10+ syntax in utils and c…#3529

Merged
vfdev-5 merged 1 commit intopytorch:masterfrom
aaishwarymishra:refactor_deterministic
Feb 10, 2026
Merged

refactor: update type hints to use Python 3.10+ syntax in utils and c…#3529
vfdev-5 merged 1 commit intopytorch:masterfrom
aaishwarymishra:refactor_deterministic

Conversation

@aaishwarymishra
Copy link
Copy Markdown
Collaborator

This pull request modernizes type annotations in the ignite/engine/utils.py and ignite/handlers/clearml_logger.py modules by replacing legacy typing types (such as Optional, Union, Tuple, and List) with Python 3.10+ style type hints (using | and built-in generics). This improves code readability and consistency with current Python best practices.

Type annotation modernization:

  • Replaced old-style type hints (e.g., Optional[X], Union[X, Y], List[X], Tuple[X, Y]) with Python 3.10+ syntax (e.g., X | Y, list[X], tuple[X, Y]) throughout ignite/engine/utils.py and ignite/handlers/clearml_logger.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

No functional changes were made; all updates are strictly to type annotations for improved clarity and modernization.…learml_logger

Fixes #{issue number}

Description:

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

part of #3481

@github-actions github-actions bot added module: engine Engine module module: handlers Core Handlers module labels Feb 10, 2026
@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Feb 10, 2026

Exceptionally, ok to have 2 files with updates in one PR. Condition is: one file per one PR.

Copy link
Copy Markdown
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 !

@vfdev-5 vfdev-5 enabled auto-merge February 10, 2026 17:30
@aaishwarymishra
Copy link
Copy Markdown
Collaborator Author

Got it

@vfdev-5 vfdev-5 added this pull request to the merge queue Feb 10, 2026
Merged via the queue into pytorch:master with commit ff24af7 Feb 10, 2026
24 of 27 checks passed
@aaishwarymishra aaishwarymishra deleted the refactor_deterministic branch March 3, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: engine Engine module module: handlers Core Handlers module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants