    def step(self, epoch, val_loss=None):
        """Update the learning rate at the end of the given epoch."""
        if val_loss is not None:
            if self.best is None:
                self.best = val_loss
            else:
                self.best = min(self.best, val_loss)
Update the learning rate at the end of the given epoch.
fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py