class_docstr: This Callback 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_lr
      Lower bound for the learning rate, learning rate will never go below
      `min_lr`.
code: def __init__(
      self,
      objective: Literal["min", "max"],
      patience: int,
      base_lr: float = 0.01,
      decay_factor: float = 0.5,
      min_lr: float = 0.0,
  ) -> None:
      assert (
          0 < decay_factor < 1
      ), "The value of `decay_factor` should be in the (0, 1) range"
      assert patience >= 0, "The value of `patience` should be >= 0"
      assert (
          0 <= min_lr <= base_lr
      ), "The value of `min_lr` should be >= 0 and <= base_lr"
  
      self.lr_scheduler = MetricAttentiveScheduler(
          patience=Patience(
              patience=patience, objective=Objective.from_str(objective)
          ),
          learning_rate=base_lr,
          decay_factor=decay_factor,
          min_learning_rate=min_lr,
      )
  
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 1 to create a new LearningRateReduction object from inherited base classes: Callback with example: obj = LearningRateReduction(objective, patience, base_lr, decay_factor, min_lr)