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: As many buffers as the distance from this stage to the last stage.
          
code: def num_pipe_buffers(self):
      """As many buffers as the distance from this stage to the last stage."""
      buffers = min(self.stages - self.stage_id + 1, 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