Int num_sanity_val_steps is always replaced by float limit_val_batches
The type annotations of num_sanity_val_steps: and limit_val_batches are int and Union[int, float] for percent or num_batches. The minimum of percent and num_batches will be percent. (except when num_batches==0)

  
    
      pytorch-lightning/pytorch_lightning/trainer/trainer.py
    
    
         Line 461
      in
      a59e140
    
  
  
    

        
          
           self.num_sanity_val_steps = min(num_sanity_val_steps, limit_val_batches) 
        
    
  


Maybe we can remove the dependency of limit_val_batches from num_sanity_val_steps and revert to

  
    
      pytorch-lightning/pytorch_lightning/trainer/trainer.py
    
    
         Line 491
      in
      1e68968
    
  
  
    

        
          
           self.num_sanity_val_steps = float("inf") if num_sanity_val_steps == -1 else num_sanity_val_steps