src/transformers/trainer.py/Trainer/store_flos
class Trainer:    def store_flos(self):
        # Storing the number of floating-point operations that went into the model
        if self.args.local_rank != -1:
            self.state.total_flos += distributed_broadcast_scalars([self.current_flos]).sum().item()
            self.current_flos = 0
        else:
            self.state.total_flos += self.current_flos
            self.current_flos = 0