def save_loggers_on_train_batch_end(self):
    should_flush_logs = self.trainer.logger_connector.should_flush_logs
    if (should_flush_logs and self.trainer.is_global_zero and (self.trainer.logger is not None)):
        self.trainer.logger.save()
def save_loggers_on_train_batch_end(self):
    should_flush_logs = self.trainer.logger_connector.should_flush_logs
    if (should_flush_logs and self.trainer.is_global_zero and (self.trainer.logger is not None)):
        self.trainer.logger.save()