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 end(self, session):
      if self._log_at_end:
          values = session.run(self._current_tensors)
          self._log_metric(values)
  
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 4 for calling the LoggingMetricHook obj's underlying member method code with example usage: obj.end(session) without return types