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: Uses simple_save to save a trained model, plus info to make it easy
  to associated tensors to variables after restore. 
docstr_tok: ["Uses","simple_save","to","save","a","trained","model",",","plus","info","to","make","it","easy","to","associated","tensors","to","variables","after","restore","."]
code: def _tf_simple_save(self, itr=None):
      """
      Uses simple_save to save a trained model, plus info to make it easy
      to associated tensors to variables after restore.
      """
      if proc_id() == 0:
          assert hasattr(
              self, "tf_saver_elements"
          ), "First have to setup saving with self.setup_tf_saver"
          fpath = "tf1_save" + ("%d" % itr if itr is not None else "")
          fpath = osp.join(self.output_dir, fpath)
          if osp.exists(fpath):
              # simple_save refuses to be useful if fpath already exists,
              # so just delete fpath if it's there.
              shutil.rmtree(fpath)
          tf.saved_model.simple_save(
              export_dir=fpath, **self.tf_saver_elements
          )
          joblib.dump(
              self.tf_saver_info, osp.join(fpath, "model_info.pkl")
          )
  
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 7 for calling the Logger obj's underlying member method code with example usage: obj._tf_simple_save(itr) without return types