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.
docstr: Store an iterator to sample for training data. 
docstr_tok: ["Store","an","iterator","to","sample","for","training","data","."]
code: def set_dataiterator(self, iterator):
      """Store an iterator to sample for training data."""
      if self.is_first_stage() or self.is_last_stage():
          self.training_dataloader = None
          self.data_iterator = iterator
  
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 18 for calling the PipelineEngine obj's underlying member method code with example usage: obj.set_dataiterator(iterator) without return types