def fall_back_to_prev_best_status(self):
    'Go back to the past best status and switch to the recent best model.'
    if self.fall_back_to_best_model:
        print_rank('falling back to model {}'.format(self.best_model_path))
        tmp_lr = get_lr(self.worker_trainer.optimizer)
        self.worker_trainer.load(self.best_model_path, update_lr_scheduler=False, update_ss_scheduler=False)
        for g in self.worker_trainer.optimizer.param_groups:
            g['lr'] = tmp_lr
        if (self.server_trainer is not None):
            self.server_trainer.model = self.worker_trainer.model
Go back to the past best status and switch to the recent best model.
def fall_back_to_prev_best_status(self):
    
    if self.fall_back_to_best_model:
        print_rank('falling back to model {}'.format(self.best_model_path))
        tmp_lr = get_lr(self.worker_trainer.optimizer)
        self.worker_trainer.load(self.best_model_path, update_lr_scheduler=False, update_ss_scheduler=False)
        for g in self.worker_trainer.optimizer.param_groups:
            g['lr'] = tmp_lr
        if (self.server_trainer is not None):
            self.server_trainer.model = self.worker_trainer.model