File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/lightning/pytorch/loops Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -481,12 +481,15 @@ def on_advance_end(self) -> None:
481
481
482
482
trainer ._logger_connector .on_epoch_end ()
483
483
484
- if not self .restarting and self .epoch_loop ._num_ready_batches_reached ():
485
- # since metric-based schedulers require access to metrics and those are not currently saved in the
486
- # checkpoint, the plateau schedulers shouldn't be updated when restarting
487
- # only update plateau schedulers if validation ran this epoch to ensure monitored metrics are available
488
- if self .epoch_loop ._should_check_val_epoch ():
489
- self .epoch_loop .update_lr_schedulers ("epoch" , update_plateau_schedulers = True )
484
+ # since metric-based schedulers require access to metrics and those are not currently saved in the
485
+ # checkpoint, the plateau schedulers shouldn't be updated when restarting
486
+ # only update plateau schedulers if validation ran this epoch to ensure monitored metrics are available
487
+ if (
488
+ not self .restarting
489
+ and self .epoch_loop ._num_ready_batches_reached ()
490
+ and self .epoch_loop ._should_check_val_epoch ()
491
+ ):
492
+ self .epoch_loop .update_lr_schedulers ("epoch" , update_plateau_schedulers = True )
490
493
491
494
# we manually decrease here because loggers expect that the same step is used when logging epoch-end metrics
492
495
# even when the batch loop has finished
You can’t perform that action at this time.
0 commit comments