From b7c96203929a6c2ba18618f1b02730c5d6a119a1 Mon Sep 17 00:00:00 2001 From: vfdev Date: Fri, 10 Nov 2023 22:52:54 +0100 Subject: [PATCH] Fixed mypy issues (#3129) * Fixed mypy issues * Revert changes for visdom --- ignite/contrib/engines/common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ignite/contrib/engines/common.py b/ignite/contrib/engines/common.py index acff852e8c1..9cb9a1915c4 100644 --- a/ignite/contrib/engines/common.py +++ b/ignite/contrib/engines/common.py @@ -167,9 +167,7 @@ def _setup_common_training_handlers( if lr_scheduler is not None: if isinstance(lr_scheduler, PyTorchLRScheduler): - trainer.add_event_handler( - Events.ITERATION_COMPLETED, lambda engine: cast(PyTorchLRScheduler, lr_scheduler).step() - ) + trainer.add_event_handler(Events.ITERATION_COMPLETED, lambda engine: lr_scheduler.step()) else: trainer.add_event_handler(Events.ITERATION_STARTED, lr_scheduler)