    def log(self, stats, tag=None, step=None):
        """Log intermediate stats according to log_interval."""
        self.tqdm.set_postfix(self._format_stats(stats), refresh=False)
Log intermediate stats according to log_interval.
fairseq/logging/progress_bar.py