class_docstr: A general-purpose logger.
  
  Makes it easy to save diagnostics, hyperparameter configurations, the 
  state of a training run, and the trained model.
docstr: Log a value of some diagnostic.
  
  Call this only once for each diagnostic quantity, each iteration.
  After using ``log_tabular`` to store values for each diagnostic,
  make sure to call ``dump_tabular`` to write them out to file and
  stdout (otherwise they will not get saved anywhere).
docstr_tok: ["Log","a","value","of","some","diagnostic",".","Call","this","only","once","for","each","diagnostic","quantity",",","each","iteration",".","After","using","``","log_tabular","``","to","store","values","for","each","diagnostic",",","make","sure","to","call","``","dump_tabular","``","to","write","them","out","to","file","and","stdout","(","otherwise","they","will","not","get","saved","anywhere",")","."]
code: def log_tabular(self, key, val):
      """
      Log a value of some diagnostic.
  
      Call this only once for each diagnostic quantity, each iteration.
      After using ``log_tabular`` to store values for each diagnostic,
      make sure to call ``dump_tabular`` to write them out to file and
      stdout (otherwise they will not get saved anywhere).
      """
      if self.first_row:
          self.log_headers.append(key)
      else:
          assert key in self.log_headers, (
              "Trying to introduce a new key %s that you didn't include in the first iteration"
              % key
          )
      assert key not in self.log_current_row, (
          "You already set %s this iteration. Maybe you forgot to call dump_tabular()"
          % key
      )
      self.log_current_row[key] = val
  
imports: import json
  import joblib
  import shutil
  import numpy
  import tensorflow
  import torch
  import os.path, time, atexit, os
  import warnings
  from spinup.utils.mpi_tools import proc_id, mpi_statistics_scalar
  from spinup.utils.serialization_utils import convert_json
label_desc: Use image node_id 3 for calling the Logger obj's underlying member method code with example usage: obj.log_tabular(key, val) without return types