MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / _next_batch

Method _next_batch

deepspeed/runtime/pipe/engine.py:686–696  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

684 print(*msg)
685
686 def _next_batch(self):
687 # If using 3D parallelism, only some first-stage ranks may do IO
688 batch = None
689 if self.data_iterator is not None:
690 batch = next(self.data_iterator)
691
692 # Any post-processing, like broadcasting across a slice-parallel group.
693 if self.batch_fn:
694 batch = self.batch_fn(batch)
695
696 return batch
697
698 def _exec_forward_pass(self, buffer_id):
699 self.tput_timer.start()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected