class_docstr: Lower the learning rate as soon as the validation score plateaus.
  
  :param optimizer: Optimizer.
  :param base_lr: Base learning rate.
  :param reduce_factor: Factor to reduce learning rate with.
  :param reduce_num_not_improved: Number of checkpoints with no improvement
                                  after which learning rate is reduced.
  :param warmup: Number of initial updates during which the learning rate
                 linearly increases.
class_docstr_tok: ["Lower","the","learning","rate","as","soon","as","the","validation","score","plateaus",".",":","param","optimizer",":","Optimizer",".",":","param","base_lr",":","Base","learning","rate",".",":","param","reduce_factor",":","Factor","to","reduce","learning","rate","with",".",":","param","reduce_num_not_improved",":","Number","of","checkpoints","with","no","improvement","after","which","learning","rate","is","reduced",".",":","param","warmup",":","Number","of","initial","updates","during","which","the","learning","rate","linearly","increases","."]
docstr: Returns true if the parameters should be reset to the ones with the best validation score.
  
  :param has_improved: Whether the model improved on held-out validation data.
  :return: True if parameters should be reset to the ones with best validation score.
docstr_tok: ["Returns","true","if","the","parameters","should","be","reset","to","the","ones","with","the","best","validation","score",".",":","param","has_improved",":","Whether","the","model","improved","on","held-out","validation","data",".",":","return",":","True","if","parameters","should","be","reset","to","the","ones","with","best","validation","score","."]
code: def new_evaluation_result(self, has_improved: bool) -> bool:
      """
      Returns true if the parameters should be reset to the ones with the best validation score.
  
      :param has_improved: Whether the model improved on held-out validation data.
      :return: True if parameters should be reset to the ones with best validation score.
      """
      if has_improved:
          self.num_not_improved = 0
      else:
          self.num_not_improved += 1
          if (
              self.num_not_improved >= self.reduce_num_not_improved
              and self.reduce_factor < 1.0
              and self.warmed_up
          ):
              old_lr = self.lr
              self.lr *= self.reduce_factor
              logger.info(
                  "%d checkpoints since improvement or rate scaling, "
                  "lowering learning rate: %1.2e -> %1.2e",
                  self.num_not_improved,
                  old_lr,
                  self.lr,
              )
              self.num_not_improved = 0
              return True
      return False
  
imports: import logging
  from math import sqrt
  from typing import Any, Dict, List, Optional, Tuple, Type
  import torch
  import sockeye.constants
  from sockeye.utils import check_condition
label_desc: Use image node_id 3 for calling the LearningRateSchedulerPlateauReduce obj's underlying member method code with example usage: obj.new_evaluation_result(has_improved) and returns: False, True