docstr: See base class method `ReportMgrBase.report_step`.
docstr_tok: ["See","base","class","method","`","ReportMgrBase.report_step","`","."]
code: def _report_step(
      self, lr, patience, step, valid_stats=None, train_stats=None
  ):
      """
      See base class method `ReportMgrBase.report_step`.
      """
      if train_stats is not None:
          self.log("Train perplexity: %g" % train_stats.ppl())
          self.log("Train accuracy: %g" % train_stats.accuracy())
          self.log("Sentences processed: %g" % train_stats.n_sents)
          self.log(
              "Average bsz: %4.0f/%4.0f/%2.0f"
              % (
                  train_stats.n_src_words / train_stats.n_batchs,
                  train_stats.n_words / train_stats.n_batchs,
                  train_stats.n_sents / train_stats.n_batchs,
              )
          )
  
          self.maybe_log_tensorboard(
              train_stats, "train", lr, patience, step
          )
      if valid_stats is not None:
          self.log("Validation perplexity: %g" % valid_stats.ppl())
          self.log("Validation accuracy: %g" % valid_stats.accuracy())
  
          self.maybe_log_tensorboard(
              valid_stats, "valid", lr, patience, step
          )
  
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 ReportMgr obj's underlying member method code with example usage: obj._report_step(lr, patience, step, valid_stats, train_stats) without return types