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 _log_metric(self, tensor_values):
      self._timer.update_last_triggered_step(self._iter_count)
      global_step = tensor_values[self._global_step_tensor.name]
      # self._tag_order is populated during the init of LoggingTensorHook
      for tag in self._tag_order:
          self._logger.log_metric(
              tag, tensor_values[tag], global_step=global_step
          )
  
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 5 for calling the LoggingMetricHook obj's underlying member method code with example usage: obj._log_metric(tensor_values) without return types