Skip to content

Commit

Permalink
Fixed mypy issues (#3129)
Browse files Browse the repository at this point in the history
* Fixed mypy issues

* Revert changes for visdom
  • Loading branch information
vfdev-5 authored Nov 10, 2023
1 parent 39e46bf commit b7c9620
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ignite/contrib/engines/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b7c9620

Please sign in to comment.