class_docstr: A training engine hybrid pipeline, data, and model parallel training.
  
  This engine is created by ``deepspeed.initialize()`` when a :class:`PipelineModule`
  is provided.
class_docstr_tok: ["A","training","engine","hybrid","pipeline",",","data",",","and","model","parallel","training",".","This","engine","is","created","by","``","deepspeed.initialize","(",")","``","when","a",":","class",":","`","PipelineModule","`","is","provided","."]
code: def _exec_optimizer_step(self, lr_kwargs=None):
      if self.wall_clock_breakdown():
          self.timers(STEP_MICRO_TIMER).start()
          self.timers(STEP_GLOBAL_TIMER).start()
      self.mem_status("BEFORE STEP", reset_max=True)
  
      self._force_grad_boundary = True
      self._take_model_step(lr_kwargs)
      self._force_grad_boundary = False
  
      self.mem_status("AFTER STEP")
  
      if self.global_rank == 0 and self.monitor.enabled:
          self.summary_events = [
              (
                  f"Train/Samples/lr",
                  self.get_lr()[0],
                  self.global_samples,
              )
          ]
          if self.fp16_enabled() and hasattr(
              self.optimizer, "cur_scale"
          ):
              self.summary_events.append(
                  (
                      f"Train/Samples/loss_scale",
                      self.optimizer.cur_scale,
                      self.global_samples,
                  )
              )
          self.monitor.write_events(self.summary_events)
  
      if self.wall_clock_breakdown():
          self.timers(STEP_MICRO_TIMER).stop()
          self.timers(STEP_GLOBAL_TIMER).stop()
          if self.global_steps % self.steps_per_print() == 0:
              self.timers.log(
                  [
                      BATCH_INPUT_TIMER,
                      FORWARD_MICRO_TIMER,
                      BACKWARD_MICRO_TIMER,
                      BACKWARD_INNER_MICRO_TIMER,
                      BACKWARD_REDUCE_MICRO_TIMER,
                      STEP_MICRO_TIMER,
                  ]
              )
          if self.global_steps % self.steps_per_print() == 0:
              self.timers.log(
                  [
                      FORWARD_GLOBAL_TIMER,
                      BACKWARD_GLOBAL_TIMER,
                      BACKWARD_INNER_GLOBAL_TIMER,
                      BACKWARD_REDUCE_GLOBAL_TIMER,
                      STEP_GLOBAL_TIMER,
                  ]
              )
  
imports: from types import MethodType
  import torch
  from deepspeed import comm
  from deepspeed.utils import logger
  from deepspeed.utils.timer import ThroughputTimer
  from deepspeed.accelerator import get_accelerator
  from deepspeed.runtime.bf16_optimizer import BF16_Optimizer
  from ..engine import DeepSpeedEngine, MEMORY_OPT_ALLREDUCE_SIZE
  from deepspeed.utils.timer import FORWARD_MICRO_TIMER, FORWARD_GLOBAL_TIMER, BACKWARD_MICRO_TIMER, BACKWARD_GLOBAL_TIMER, BACKWARD_INNER_MICRO_TIMER, BACKWARD_INNER_GLOBAL_TIMER, BACKWARD_REDUCE_MICRO_TIMER, BACKWARD_REDUCE_GLOBAL_TIMER, STEP_MICRO_TIMER, STEP_GLOBAL_TIMER
  from ..utils import PartitionedTensor
  from ..dataloader import RepeatingLoader
  from ..zero.config import ZeroStageEnum
  from ..activation_checkpointing import checkpointing
  from .module import PipelineModule, PipelineError
  from .None import p2p
  from .None import schedule
label_desc: Use image node_id 33 for calling the PipelineEngine obj's underlying member method code with example usage: obj._exec_optimizer_step(lr_kwargs) without return types