ReduceLROnPlateau scheduler type check #1114
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Open to be worked on
let's do it!
approved to implement
Milestone
🐛 Bug
Incorrect type check for scheduler of class ReduceLROnPlateau.
https://github.com/PyTorchLightning/pytorch-lightning/blob/bc01b9ac1c0ddf503f83755c00d5541a2679e5b4/pytorch_lightning/trainer/trainer.py#L713
I believe, this check:
isinstance(scheduler, optim.lr_scheduler.ReduceLROnPlateau)
must look like this:
isinstance(scheduler['scheduler'], optim.lr_scheduler.ReduceLROnPlateau)
To Reproduce
Steps to reproduce the behavior:
optim.lr_scheduler.ReduceLROnPlateau
in theconfigure_optimizers
method of aLightningModule
class.return [optimizer], [scheduler]
.trainer.fit(module)
.The text was updated successfully, but these errors were encountered: