class_docstr: Class to log the benchmark information to local disk.
class_docstr_tok: ["Class","to","log","the","benchmark","information","to","local","disk","."]
docstr: Collect most of the TF runtime information for the local env.
  
  The schema of the run info follows official/benchmark/datastore/schema.
  
  Args:
    model_name: string, the name of the model.
    dataset_name: string, the name of dataset for training and evaluation.
    run_params: dict, the dictionary of parameters for the run, it could
      include hyperparameters or other params that are important for the run.
    test_id: string, the unique name of the test run by the combination of key
      parameters, eg batch size, num of GPU. It is hardware independent.
docstr_tok: ["Collect","most","of","the","TF","runtime","information","for","the","local","env",".","The","schema","of","the","run","info","follows","official\/benchmark\/datastore\/schema",".","Args",":","model_name",":","string",",","the","name","of","the","model",".","dataset_name",":","string",",","the","name","of","dataset","for","training","and","evaluation",".","run_params",":","dict",",","the","dictionary","of","parameters","for","the","run",",","it","could","include","hyperparameters","or","other","params","that","are","important","for","the","run",".","test_id",":","string",",","the","unique","name","of","the","test","run","by","the","combination","of","key","parameters",",","eg","batch","size",",","num","of","GPU",".","It","is","hardware","independent","."]
code: def log_run_info(
      self, model_name, dataset_name, run_params, test_id=None
  ):
      """Collect most of the TF runtime information for the local env.
  
      The schema of the run info follows official/benchmark/datastore/schema.
  
      Args:
        model_name: string, the name of the model.
        dataset_name: string, the name of dataset for training and evaluation.
        run_params: dict, the dictionary of parameters for the run, it could
          include hyperparameters or other params that are important for the run.
        test_id: string, the unique name of the test run by the combination of key
          parameters, eg batch size, num of GPU. It is hardware independent.
      """
      run_info = _gather_run_info(
          model_name, dataset_name, run_params, test_id
      )
  
      with tf.io.gfile.GFile(
          os.path.join(self._logging_dir, BENCHMARK_RUN_LOG_FILE_NAME),
          "w",
      ) as f:
          try:
              json.dump(run_info, f)
              f.write("\n")
          except (TypeError, ValueError) as e:
              tf.compat.v1.logging.warning(
                  "Failed to dump benchmark run info to log file: %s", e
              )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import datetime
  import json
  import multiprocessing
  import numbers
  import os
  import threading
  import uuid
  from six.moves import _thread
  from absl import flags
  import tensorflow
  from tensorflow.python.client import device_lib
  from utils.logs import cloud_lib
label_desc: Use image node_id 3 for calling the BenchmarkFileLogger obj's underlying member method code with example usage: obj.log_run_info(model_name, dataset_name, run_params, test_id) without return types