Flush logger connector metrics on Trainer state change
🚀 Feature
See title
The logger connector metrics should be grouped by RunningStage.
To be done after #4945
This will facilitate progress bar printing and clean out the code
Context

  
    
      pytorch-lightning/pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
    
    
        Lines 349 to 352
      in
      110e49d
    
  
  
    

        
          
           # TODO(carmocca): when we implement flushing the logger connector metrics after 
        

        
          
           # the trainer.state changes, this should check trainer.evaluating instead 
        

        
          
           if self.trainer.state.fn in (TrainerFn.TESTING, TrainerFn.VALIDATING): 
        

        
          
               logger_connector.evaluation_callback_metrics.update(callback_metrics)