class_docstr: This scheduler decreases the learning rate based on the value of some
  validation metric to be optimized (maximized or minimized). The value
  of such metric is provided by calling the `step` method on the scheduler.
  A `patience` parameter must be provided, and the scheduler will reduce
  the learning rate if no improvement in the metric is done before
  `patience` observations of the metric.
  
  Examples:
  
      `patience = 0`: learning rate will decrease at every call to
      `step`, regardless of the metric value
  
      `patience = 1`: learning rate is reduced as soon `step` is called
      with a metric value which does not improve over the best encountered
  
      `patience = 10`: learning rate is reduced if no improvement in the
      metric is recorded in 10 successive calls to `step`
  
  Parameters
  ----------
  objective
      String, can either be `"min"` or `"max"`
  patience
      The patience to observe before reducing the learning rate, nonnegative
      integer.
  base_lr
      Initial learning rate to be used.
  decay_factor
      Factor (between 0 and 1) by which to decrease the learning rate.
  min_learning_rate
      Lower bound for the learning rate, learning rate will never go below
      `min_learning_rate`.
docstr: Inform the scheduler of the new value of the metric that is being
  optimized. This method should be invoked at regular intervals (e.g. at
  the end of every epoch, after computing a validation score).
  
  Parameters
  ----------
  metric_value
      Value of the metric that is being optimized.
  
  Returns
  -------
  bool value indicating, whether to continue training
docstr_tok: ["Inform","the","scheduler","of","the","new","value","of","the","metric","that","is","being","optimized",".","This","method","should","be","invoked","at","regular","intervals","(","e.g",".","at","the","end","of","every","epoch",",","after","computing","a","validation","score",")",".","Parameters","--","--","--","--","--","metric_value","Value","of","the","metric","that","is","being","optimized",".","Returns","--","--","--","-","bool","value","indicating",",","whether","to","continue","training"]
code: def step(self, metric_value: float) -> bool:
      """
      Inform the scheduler of the new value of the metric that is being
      optimized. This method should be invoked at regular intervals (e.g. at
      the end of every epoch, after computing a validation score).
  
      Parameters
      ----------
      metric_value
          Value of the metric that is being optimized.
  
      Returns
      -------
      bool value indicating, whether to continue training
      """
  
      self.patience.step(metric_value)
  
      should_continue = True
  
      if self.patience.exceeded or not np.isfinite(metric_value):
          if (
              self.learning_rate == self.min_learning_rate
              or self.max_num_decays is not None
              and self.max_num_decays <= self.patience.num_resets
          ):
              should_continue = False
  
          # Even though we ask not to continue, we still reset the patience
          # because we might still end up continuing training. (Can Happen
          # in testing).
          self.patience.reset()
  
          self.learning_rate *= self.decay_factor
          # ensure that we don't go below the minimum learning rate
          if self.learning_rate < self.min_learning_rate:
              self.learning_rate = self.min_learning_rate
  
      return should_continue
  
imports: from dataclasses import field
  from typing import Dict, Any, Optional
  from typing_extensions import Literal
  import numpy
  import mxnet
  from mxnet import gluon
  import mxnet.gluon.nn
  from gluonts.core.component import validated
  from gluonts.pydantic import dataclass
  from .callback import Callback
label_desc: Use image node_id 2 for calling the MetricAttentiveScheduler obj's underlying member method code with example usage: obj.step(metric_value) and returns: should_continue