Not saving checkpoint when monitor is None and save_top_k is -1
🐛 Bug
When monitor is None, current will be None here

  
    
      pytorch-lightning/pytorch_lightning/callbacks/model_checkpoint.py
    
    
         Line 553
      in
      6bc4490
    
  
  
    

        
          
           current = metrics.get(self.monitor) 
        
    
  


And check_monitor_top_k will return False because of that:

  
    
      pytorch-lightning/pytorch_lightning/callbacks/model_checkpoint.py
    
    
         Line 340
      in
      6bc4490
    
  
  
    

        
          
           if current is None: 
        
    
  


_update_best_and_save also doesn't take None current. raise error here: 
  
    
      pytorch-lightning/pytorch_lightning/callbacks/model_checkpoint.py
    
    
         Line 605
      in
      6bc4490
    
  
  
    

        
          
           f"Epoch {epoch:d}, global step {step:d}: {self.monitor} reached {current:0.5f}" 
        
    
  


Currently, checkpointing is associated with validation, which is not necessarily always the case. I just want to save the checkpoint every k iterations.
Please reproduce using the BoringModel
Sorry, no time to reproduce for now.
To Reproduce
Use following BoringModel and post here

Expected behavior
Should save the checkpoint always if save_top_k == -1.
Environment
Note: Bugs with code are solved faster ! Colab Notebook should be made public !


IDE: Please, use our python bug_report_model.py template.


Colab Notebook: Please copy and paste the output from our environment collection script (or fill out the checklist below manually).


You can get the script and run it with:
wget https://raw.githubusercontent.com/PyTorchLightning/pytorch-lightning/master/tests/collect_env_details.py
# For security purposes, please check the contents of collect_env_details.py before running it.
python collect_env_details.py


PyTorch Version (e.g., 1.0):
OS (e.g., Linux):
How you installed PyTorch (conda, pip, source):
Build command you used (if compiling from source):
Python version:
CUDA/cuDNN version:
GPU models and configuration:
Any other relevant information:

Additional context