remove deprecated args to learning rate step function (#890)

This commit is contained in:
Nicki Skafte
2020-02-19 06:37:35 -05:00
committed by GitHub
parent c4b0693a4d
commit c58aab0b00
+2 -2
View File
@@ -362,7 +362,7 @@ class TrainerTrainLoopMixin(ABC):
# update LR schedulers
if self.lr_schedulers is not None:
for lr_scheduler in self.lr_schedulers:
lr_scheduler.step(epoch=self.current_epoch)
lr_scheduler.step()
if self.reduce_lr_on_plateau_scheduler is not None:
val_loss = self.callback_metrics.get('val_loss')
if val_loss is None:
@@ -370,7 +370,7 @@ class TrainerTrainLoopMixin(ABC):
m = f'ReduceLROnPlateau conditioned on metric val_loss ' \
f'which is not available. Available metrics are: {avail_metrics}'
raise MisconfigurationException(m)
self.reduce_lr_on_plateau_scheduler.step(val_loss, epoch=self.current_epoch)
self.reduce_lr_on_plateau_scheduler.step(val_loss)
if self.max_steps and self.max_steps == self.global_step:
self.main_progress_bar.close()