class_docstr: Log objects to tensorboard.
docstr: Log all metrics to tensorboard.
  
  :param setting:
      One of train/valid/test. Will be used as the title for the graph.
  :param step:
      Number of parleys
  :param report:
      The report to log
docstr_tok: ["Log","all","metrics","to","tensorboard",".",":","param","setting",":","One","of","train\/valid\/test",".","Will","be","used","as","the","title","for","the","graph",".",":","param","step",":","Number","of","parleys",":","param","report",":","The","report","to","log"]
code: def log_metrics(self, setting, step, report):
      """
      Log all metrics to tensorboard.
  
      :param setting:
          One of train/valid/test. Will be used as the title for the graph.
      :param step:
          Number of parleys
      :param report:
          The report to log
      """
      for k, v in report.items():
          v = v.value() if isinstance(v, Metric) else v
          if not isinstance(v, numbers.Number):
              logging.error(f"k {k} v {v} is not a number")
              continue
          display = get_metric_display_data(metric=k)
          # Remove invalid characters for TensborboardX Summary beforehand
          # so that the logs aren't cluttered with warnings.
          tag = _TB_SUMMARY_INVALID_TAG_CHARACTERS.sub(
              "_", f"{k}/{setting}"
          )
          try:
              self.writer.add_scalar(
                  tag,
                  v,
                  global_step=step,
                  display_name=f"{display.title}",
                  summary_description=display.description,
              )
          except TypeError:
              # internal tensorboard doesn't support custom display titles etc
              self.writer.add_scalar(tag, v, global_step=step)
  
imports: import datetime
  import json
  import numbers
  import os
  import pathlib
  import re
  from typing import Optional
  import parlai.utils.logging
  from parlai.core.metrics import Metric, dict_report, get_metric_display_data
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.utils.io import PathManager
label_desc: Use image node_id 3 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.log_metrics(setting, step, report) without return types