class_docstr: Report Manager Base class
  Inherited classes should override:
      * `_report_training`
      * `_report_step`
class_docstr_tok: ["Report","Manager","Base","class","Inherited","classes","should","override",":","*","`","_report_training","`","*","`","_report_step","`"]
docstr: This is the user-defined batch-level traing progress
  report function.
  Args:
      step(int): current step count.
      num_steps(int): total number of batches.
      learning_rate(float): current learning rate.
      report_stats(Statistics): old Statistics instance.
  Returns:
      report_stats(Statistics): updated Statistics instance.
docstr_tok: ["This","is","the","user-defined","batch-level","traing","progress","report","function",".","Args",":","step","(","int",")",":","current","step","count",".","num_steps","(","int",")",":","total","number","of","batches",".","learning_rate","(","float",")",":","current","learning","rate",".","report_stats","(","Statistics",")",":","old","Statistics","instance",".","Returns",":","report_stats","(","Statistics",")",":","updated","Statistics","instance","."]
code: def report_training(
      self,
      step,
      num_steps,
      learning_rate,
      patience,
      report_stats,
      multigpu=False,
  ):
      """
      This is the user-defined batch-level traing progress
      report function.
      Args:
          step(int): current step count.
          num_steps(int): total number of batches.
          learning_rate(float): current learning rate.
          report_stats(Statistics): old Statistics instance.
      Returns:
          report_stats(Statistics): updated Statistics instance.
      """
      if self.start_time < 0:
          raise ValueError(
              """ReportMgr needs to be started
                                  (set 'start_time' or use 'start()'"""
          )
  
      if step % self.report_every == 0:
          if multigpu:
              report_stats = onmt.utils.Statistics.all_gather_stats(
                  report_stats
              )
          self._report_training(
              step, num_steps, learning_rate, patience, report_stats
          )
          return onmt.utils.Statistics()
      else:
          return report_stats
  
imports: import time
  from datetime import datetime
  import onmt
  from onmt.utils.logging import logger
label_desc: Use image node_id 4 for calling the ReportMgrBase obj's underlying member method code with example usage: obj.report_training(step, num_steps, learning_rate, patience, report_stats, multigpu) and returns: onmt, report_stats