    def begin_epoch(self, epoch, model):
        """Hook function called before the start of each epoch."""
        pass
Hook function called before the start of each epoch.
fairseq/tasks/fairseq_task.py