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
docstr_tok: ["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):
      """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
      )
      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 ..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 42 for calling the PipelineEngine obj's underlying member method code with example usage: obj.module_state_dict() and returns: None