class_docstr: A schedule for training a batch using hybrid parallelism.
  
  Pipeline parallelism is extracted through gradient accumulation and thus
  convergence follows that of a data parallel approach with the same batch
  size.
class_docstr_tok: ["A","schedule","for","training","a","batch","using","hybrid","parallelism",".","Pipeline","parallelism","is","extracted","through","gradient","accumulation","and","thus","convergence","follows","that","of","a","data","parallel","approach","with","the","same","batch","size","."]
docstr: Return the number of pipeline buffers required for this stage.
  
  This is equivalent to the maximum number of in-flight forward passes,
  since we need to remember the activations of forward passes in order
  to run backpropagation. For synchronous 1F1B, this is equivalent to
  the index difference between this stage and the last stage.
code: def num_pipe_buffers(self):
      """Return the number of pipeline buffers required for this stage.
  
      This is equivalent to the maximum number of in-flight forward passes,
      since we need to remember the activations of forward passes in order
      to run backpropagation. For synchronous 1F1B, this is equivalent to
      the index difference between this stage and the last stage.
      """
      buffers = min(self.stages - self.stage_id, self.micro_batches)
      return max(2, buffers)
  
imports: from ..utils import call_to_str
  from abc import ABC, abstractmethod
label_desc: Use image node_id 2 for calling the TrainSchedule obj's underlying member method code with example usage: obj.num_pipe_buffers() and returns: max