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","."]
docstr: Override hack to save a pipe model and return the directory path of the save.
  
  This method should only be called by DeepSpeed's ``save_checkpoint()``. The
  recommended way of saving a ``PipelineModule`` outside of ``save_checkpoint()``
  is ``save_state_dict()``.
  
  Returns:
      None
code: def module_state_dict(self, exclude_frozen_parameters=False):
      """Override hack to save a pipe model and return the directory path of the save.
  
      This method should only be called by DeepSpeed's ``save_checkpoint()``. The
      recommended way of saving a ``PipelineModule`` outside of ``save_checkpoint()``
      is ``save_state_dict()``.
  
      Returns:
          None
      """
      assert isinstance(self.module, PipelineModule)
      assert (
          self._curr_ckpt_path is not None
      ), "PipelineEngine expects module_state_dict() to be called from save_checkpoint()"
  
      self.module.save_state_dict(
          self._curr_ckpt_path,
          checkpoint_engine=self.checkpoint_engine,
          exclude_frozen_params=exclude_frozen_parameters,
      )
      return None
  
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 41 for calling the PipelineEngine obj's underlying member method code with example usage: obj.module_state_dict(exclude_frozen_parameters) and returns: None