class_docstr: Stores the steps_per_checkpoint and total_steps used during the current training run.
  
  This class is needed by LambdaLR to allow us to update the steps on training init without resetting the entire
  LRScheduler from scratch (which would result in resetting the optimizer learning rate).
class_docstr_tok: ["Stores","the","steps_per_checkpoint","and","total_steps","used","during","the","current","training","run",".","This","class","is","needed","by","LambdaLR","to","allow","us","to","update","the","steps","on","training","init","without","resetting","the","entire","LRScheduler","from","scratch","(","which","would","result","in","resetting","the","optimizer","learning","rate",")","."]
code: def __init__(
      self,
      steps_per_checkpoint: int,
      total_steps: int,
      config: LRSchedulerConfig,
  ):
      self.config = config
      self.steps_per_checkpoint = steps_per_checkpoint
      self.num_training_steps = total_steps
  
      if (
          self.config.warmup_fraction > 0
          and self.config.warmup_evaluations > 0
      ):
          logger.info(
              "Both `learning_rate_scheduler.warmup_fraction` and `learning_rate_scheduler.warmup_evaluations` "
              "provided. The larger of the two (as a function of the total training steps) will be used."
          )
  
      num_warmup_steps = 0
      if self.config.warmup_fraction > 0:
          num_warmup_steps = max(
              self.config.warmup_fraction * self.num_training_steps,
              num_warmup_steps,
          )
      if self.config.warmup_evaluations > 0:
          num_warmup_steps = max(
              self.config.warmup_evaluations
              * self.steps_per_checkpoint,
              num_warmup_steps,
          )
      self.num_warmup_steps = num_warmup_steps
  
imports: import logging
  import math
  from typing import Any, Callable, Dict
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import CosineAnnealingWarmRestarts, LambdaLR, ReduceLROnPlateau, SequentialLR
  from ludwig.constants import MINIMIZE, TRAINING, VALIDATION
  from ludwig.modules.metric_registry import get_metric_objective
  from ludwig.schema.lr_scheduler import LRSchedulerConfig
  from ludwig.utils.metric_utils import TrainerMetric
  from ludwig.utils.trainer_utils import ProgressTracker
label_desc: Use image node_id 1 to create a new StepInfo object  with example: obj = StepInfo(steps_per_checkpoint, total_steps, config)