def step_begin_epoch(self, epoch):
        """Update the learning rate at the beginning of the given epoch."""
        self.lr = self.get_next_lr(epoch)
        self.optimizer.set_lr(self.warmup_factor * self.lr)
        return self.optimizer.get_lr()
Update the learning rate at the beginning of the given epoch.
structured_prompting/fairseq-version/fairseq/fairseq/optim/lr_scheduler/polynomial_decay_schedule.py