Skip to content

Replace typing module hints with modern syntax in handlers loggers (polyaxon, visdom, wandb)#3598

Open
Manimaran-tech wants to merge 7 commits intopytorch:masterfrom
Manimaran-tech:fix/typing-handlers-loggers-part2
Open

Replace typing module hints with modern syntax in handlers loggers (polyaxon, visdom, wandb)#3598
Manimaran-tech wants to merge 7 commits intopytorch:masterfrom
Manimaran-tech:fix/typing-handlers-loggers-part2

Conversation

@Manimaran-tech
Copy link
Contributor

Description

Modernize type hints in ignite/handlers logger files (Part 2) by replacing typing module imports with Python 3.10+ built-in syntax.

Files changed:

  • ignite/handlers/polyaxon_logger.py
  • ignite/handlers/visdom_logger.py
  • ignite/handlers/wandb_logger.py

Related to #3591

@github-actions github-actions bot added the module: handlers Core Handlers module label Feb 26, 2026
output_transform: Optional[Callable] = None,
global_step_transform: Optional[Callable[[Engine, Union[str, Events]], int]] = None,
state_attributes: Optional[List[str]] = None,
metric_names: Optional[list[str] | str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here as in a previous PR: replace Optional[A] -> A | None

@Manimaran-tech Manimaran-tech force-pushed the fix/typing-handlers-loggers-part2 branch from c214a37 to df1fe69 Compare February 26, 2026 15:40
metric_names: Optional[Union[List[str], str]] = None,
output_transform: Optional[Callable] = None,
global_step_transform: Optional[Callable[[Engine, Union[str, Events]], int]] = None,
metric_names: Optional[list[str] | str] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

here, Optional is not replaced and below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: handlers Core Handlers module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants