Mismatch between docstring and code regarding when `on_load_checkpoint` hook is called
🐛 Bug
The docstring of on_load_checkpoint hook says that it is called before trying to load_state_dict:

  
    
      pytorch-lightning/pytorch_lightning/core/saving.py
    
    
        Lines 203 to 206
      in
      cea5f1f
    
  
  
    

        
          
               def on_load_checkpoint(self, checkpoint: Dict[str, Any]) -> None: 
        

        
          
                   """ 
        

        
          
                   Do something with the checkpoint. 
        

        
          
                   Gives model a chance to load something before ``state_dict`` is restored. 
        
    
  


However, in LightningModule.load_from_checkpoint, it is called after load_state_dict:

  
    
      pytorch-lightning/pytorch_lightning/core/saving.py
    
    
        Lines 195 to 199
      in
      cea5f1f
    
  
  
    

        
          
           # load the state_dict on the model automatically 
        

        
          
           model.load_state_dict(checkpoint['state_dict'], strict=strict) 
        

        
          
            
        

        
          
           # give model a chance to load something 
        

        
          
           model.on_load_checkpoint(checkpoint) 
        
    
  


Additional context
Related discussion on Slack: https://pytorch-lightning.slack.com/archives/CQXV8BRH9/p1602168345184000
I think the docstring is correct and the call to on_load_checkpoint should be moved right before load_state_dict to give the model a chance to call setup.