class_docstr: Hook to log benchmark metric information.
  
  This hook is very similar as tf.train.LoggingTensorHook, which logs given
  tensors every N local steps, every N seconds, or at the end. The metric
  information will be logged to given log_dir or via metric_logger in JSON
  format, which can be consumed by data analysis pipeline later.
  
  Note that if `at_end` is True, `tensors` should not include any tensor
  whose evaluation produces a side effect such as consuming additional inputs.
code: def after_run(self, unused_run_context, run_values):
      # should_trigger is a internal state that populated at before_run, and it is
      # using self_timer to determine whether it should trigger.
      if self._should_trigger:
          self._log_metric(run_values.results)
  
      self._iter_count += 1
  
file_path: autodist/examples/benchmark/utils/logs/metric_hook.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
label_desc: Use image node_id 3 for calling the LoggingMetricHook obj's underlying member method code with example usage: obj.after_run(unused_run_context, run_values) without return types