ReduceLROnPlateau scheduler type check
🐛 Bug
Incorrect type check for scheduler of class ReduceLROnPlateau.

  
    
      pytorch-lightning/pytorch_lightning/trainer/trainer.py
    
    
         Line 713
      in
      bc01b9a
    
  
  
    

        
          
           isinstance(scheduler, optim.lr_scheduler.ReduceLROnPlateau) 
        
    
  


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:

Create a scheduler of type optim.lr_scheduler.ReduceLROnPlateau in the configure_optimizers method of a LightningModule class.
Return an optimizer and scheduler from this method. Place them in lists: return [optimizer], [scheduler].
Execute the trainer.fit(module).
Put a break-point here: 
  
    
      pytorch-lightning/pytorch_lightning/trainer/trainer.py
    
    
         Line 712
      in
      bc01b9a
    
  
  
    

        
          
           scheduler['reduce_on_plateau'] = \ 
        
    
  


Make sure that the condition is never True.