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.
code: def _exec_optimizer_step(self, lr_kwargs=None):
      if self.wall_clock_breakdown():
          self.timers("step_microstep").start()
          self.timers("step").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_microstep").stop()
          self.timers("step").stop()
          if self.global_steps % self.steps_per_print() == 0:
              self.timers.log(
                  [
                      "batch_input",
                      "forward_microstep",
                      "backward_microstep",
                      "backward_inner_microstep",
                      "backward_allreduce_microstep",
                      "backward_tied_allreduce_microstep",
                      "step_microstep",
                  ]
              )
          if self.global_steps % self.steps_per_print() == 0:
              self.timers.log(
                  [
                      "forward",
                      "backward",
                      "backward_inner",
                      "backward_allreduce",
                      "step",
                  ]
              )
  
imports: from types import MethodType
  import torch
  from deepspeed import comm
  from deepspeed.utils import logger
  from deepspeed.utils.timer import ThroughputTimer
  from ..engine import DeepSpeedEngine, MEMORY_OPT_ALLREDUCE_SIZE
  from ..utils import PartitionedTensor
  from ..dataloader import RepeatingLoader
  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