parameters: (self, cref, process_group)
docstring: r"""
          A class that holds state information that is needed by the communication hook
          during the training algorithm.
          Args:
              cref (DdpTrainer): reference to the self keyword of the trainer instance
              process_group (ProcessGroup): distributed process group
docstring_summary: r"""
          A class that holds state information that is needed by the communication hook
          during the training algorithm.
          Args:
              cref (DdpTrainer): reference to the self keyword of the trainer instance
              process_group (ProcessGroup): distributed process group
docstring_tokens: r A class that holds state information that is needed by the communication hook during the training algorithm . Args : cref ( DdpTrainer ) : reference to the self keyword of the trainer instance process_group ( ProcessGroup ) : distributed process group
function: def __init__(self, cref, process_group):
          r"""
          A class that holds state information that is needed by the communication hook
          during the training algorithm.
          Args:
              cref (DdpTrainer): reference to the self keyword of the trainer instance
              process_group (ProcessGroup): distributed process group
          """
          self.cref = cref
          self.process_group = process_group
          self.batch_number = -1
function_tokens: def __init__ ( self , cref , process_group ) : self . cref = cref self . process_group = process_group self . batch_number = - 1