class_docstr: Base class of trainer.
  
  Use trainer.setup(algo, env) to setup algorithm and environment for trainer
  and trainer.train() to start training.
  
  Args:
      snapshot_config (garage.experiment.SnapshotConfig): The snapshot
          configuration used by Trainer to create the snapshotter.
          If None, it will create one with default settings.
  
  Note:
      For the use of any TensorFlow environments, policies and algorithms,
      please use TFTrainer().
  
  Examples:
      | # to train
      | trainer = Trainer()
      | env = Env(...)
      | policy = Policy(...)
      | algo = Algo(
      |         env=env,
      |         policy=policy,
      |         ...)
      | trainer.setup(algo, env)
      | trainer.train(n_epochs=100, batch_size=4000)
  
      | # to resume immediately.
      | trainer = Trainer()
      | trainer.restore(resume_from_dir)
      | trainer.resume()
  
      | # to resume with modified training arguments.
      | trainer = Trainer()
      | trainer.restore(resume_from_dir)
      | trainer.resume(n_epochs=20)
docstr: Log diagnostics.
  
  Args:
      pause_for_plot (bool): Pause for plot.
docstr_tok: ["Log","diagnostics",".","Args",":","pause_for_plot","(","bool",")",":","Pause","for","plot","."]
code: def log_diagnostics(self, pause_for_plot=False):
      """Log diagnostics.
  
      Args:
          pause_for_plot (bool): Pause for plot.
  
      """
      logger.log("Time %.2f s" % (time.time() - self._start_time))
      logger.log(
          "EpochTime %.2f s" % (time.time() - self._itr_start_time)
      )
      tabular.record("TotalEnvSteps", self._stats.total_env_steps)
      logger.log(tabular)
  
      if self._plot:
          self._plotter.update_plot(
              self._algo.policy, self._algo.max_episode_length
          )
          if pause_for_plot:
              input(
                  'Plotting evaluation run: Press Enter to " "continue...'
              )
  
imports: import copy
  import os
  import time
  import cloudpickle
  from dowel import logger, tabular
  from garage.experiment.deterministic import get_seed, set_seed
  from garage.experiment.experiment import dump_json
  from garage.experiment.snapshotter import Snapshotter
label_desc: Use image node_id 9 for calling the Trainer obj's underlying member method code with example usage: obj.log_diagnostics(pause_for_plot) without return types