class_docstr: A metric in an experiment.
  
  A metric is a real-valued function of a model. Each metric is
  associated with a TensorBoard scalar summary, which logs the
  metric's value as the model trains.
class_docstr_tok: ["A","metric","in","an","experiment",".","A","metric","is","a","real-valued","function","of","a","model",".","Each","metric","is","associated","with","a","TensorBoard","scalar","summary",",","which","logs","the","metric","'s","value","as","the","model","trains","."]
docstr: Args:
    tag: The tag name of the scalar summary that corresponds to this
      metric (as a `str`).
    group: An optional string listing the subdirectory under the
      session's log directory containing summaries for this metric.
      For instance, if summaries for training runs are written to
      events files in `ROOT_LOGDIR/SESSION_ID/train`, then `group`
      should be `"train"`. Defaults to the empty string: i.e.,
      summaries are expected to be written to the session logdir.
    display_name: An optional human-readable display name.
    description: An optional Markdown string with a human-readable
      description of this metric, to appear in TensorBoard.
    dataset_type: Either `Metric.TRAINING` or `Metric.VALIDATION`, or
      `None`.
docstr_tok: ["Args",":","tag",":","The","tag","name","of","the","scalar","summary","that","corresponds","to","this","metric","(","as","a","`","str","`",")",".","group",":","An","optional","string","listing","the","subdirectory","under","the","session","'s","log","directory","containing","summaries","for","this","metric",".","For","instance",",","if","summaries","for","training","runs","are","written","to","events","files","in","`","ROOT_LOGDIR\/SESSION_ID\/train","`",",","then","`","group","`","should","be","`","``","train","''","`",".","Defaults","to","the","empty","string",":","i.e.",",","summaries","are","expected","to","be","written","to","the","session","logdir",".","display_name",":","An","optional","human-readable","display","name",".","description",":","An","optional","Markdown","string","with","a","human-readable","description","of","this","metric",",","to","appear","in","TensorBoard",".","dataset_type",":","Either","`","Metric.TRAINING","`","or","`","Metric.VALIDATION","`",",","or","`","None","`","."]
code: def __init__(
      self,
      tag,
      group=None,
      display_name=None,
      description=None,
      dataset_type=None,
  ):
      """
  
      Args:
        tag: The tag name of the scalar summary that corresponds to this
          metric (as a `str`).
        group: An optional string listing the subdirectory under the
          session's log directory containing summaries for this metric.
          For instance, if summaries for training runs are written to
          events files in `ROOT_LOGDIR/SESSION_ID/train`, then `group`
          should be `"train"`. Defaults to the empty string: i.e.,
          summaries are expected to be written to the session logdir.
        display_name: An optional human-readable display name.
        description: An optional Markdown string with a human-readable
          description of this metric, to appear in TensorBoard.
        dataset_type: Either `Metric.TRAINING` or `Metric.VALIDATION`, or
          `None`.
      """
      self._tag = tag
      self._group = group
      self._display_name = display_name
      self._description = description
      self._dataset_type = dataset_type
      if self._dataset_type not in (
          None,
          Metric.TRAINING,
          Metric.VALIDATION,
      ):
          raise ValueError(
              "invalid dataset type: %r" % (self._dataset_type,)
          )
  
imports: import abc
  import hashlib
  import json
  import random
  import time
  import numpy
  from tensorboard.compat import tf2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.hparams import api_pb2
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import plugin_data_pb2
label_desc: Use image node_id 1 to create a new Metric object  with example: obj = Metric(tag, group, display_name, description, dataset_type)