class_docstr: Defines the interface for TF metrics.
docstr: Generates summaries against train_step and all step_metrics.
  
  Args:
    train_step: (Optional) Step counter for training iterations. If None, no
      metric is generated against the global step.
    step_metrics: (Optional) Iterable of step metrics to generate summaries
      against.
  
  Returns:
    A list of summaries.
docstr_tok: ["Generates","summaries","against","train_step","and","all","step_metrics",".","Args",":","train_step",":","(","Optional",")","Step","counter","for","training","iterations",".","If","None",",","no","metric","is","generated","against","the","global","step",".","step_metrics",":","(","Optional",")","Iterable","of","step","metrics","to","generate","summaries","against",".","Returns",":","A","list","of","summaries","."]
code: def tf_summaries(self, train_step=None, step_metrics=()):
      """Generates summaries against train_step and all step_metrics.
  
      Args:
        train_step: (Optional) Step counter for training iterations. If None, no
          metric is generated against the global step.
        step_metrics: (Optional) Iterable of step metrics to generate summaries
          against.
  
      Returns:
        A list of summaries.
      """
      summaries = []
      prefix = self._prefix
      tag = common.join_scope(prefix, self.name)
      result = self.result()
      if train_step is not None:
          summaries.append(
              tf.compat.v2.summary.scalar(
                  name=tag, data=result, step=train_step
              )
          )
      if prefix:
          prefix += "_"
      for step_metric in step_metrics:
          # Skip plotting the metrics against itself.
          if self.name == step_metric.name:
              continue
          step_tag = "{}vs_{}/{}".format(
              prefix, step_metric.name, self.name
          )
          # Summaries expect the step value to be an int64.
          step = tf.cast(step_metric.result(), tf.int64)
          summaries.append(
              tf.compat.v2.summary.scalar(
                  name=step_tag, data=result, step=step
              )
          )
      return summaries
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_agents.utils import common
label_desc: Use image node_id 8 for calling the TFStepMetric obj's underlying member method code with example usage: obj.tf_summaries(train_step, step_metrics) and returns: summaries