class_docstr: Object that handles running experiments.
  
  This is mostly the same as discrete_domains.TrainRunner, but is written solely
  for JAX/Flax agents.
class_docstr_tok: ["Object","that","handles","running","experiments",".","This","is","mostly","the","same","as","discrete_domains.TrainRunner",",","but","is","written","solely","for","JAX\/Flax","agents","."]
docstr: Initialize the TrainRunner object in charge of running a full experiment.
  
  Args:
    base_dir: str, the base directory to host all required sub-directories.
    create_agent_fn: A function that takes as args a Tensorflow session and an
      environment, and returns an agent.
    create_environment_fn: A function which receives a problem name and
      creates a Gym environment for that problem (e.g. an Atari 2600 game).
docstr_tok: ["Initialize","the","TrainRunner","object","in","charge","of","running","a","full","experiment",".","Args",":","base_dir",":","str",",","the","base","directory","to","host","all","required","sub-directories",".","create_agent_fn",":","A","function","that","takes","as","args","a","Tensorflow","session","and","an","environment",",","and","returns","an","agent",".","create_environment_fn",":","A","function","which","receives","a","problem","name","and","creates","a","Gym","environment","for","that","problem","(","e.g",".","an","Atari","2600","game",")","."]
code: def __init__(
      self,
      base_dir,
      create_agent_fn,
      create_environment_fn=gym_lib.create_gym_environment,
  ):
      """Initialize the TrainRunner object in charge of running a full experiment.
  
      Args:
        base_dir: str, the base directory to host all required sub-directories.
        create_agent_fn: A function that takes as args a Tensorflow session and an
          environment, and returns an agent.
        create_environment_fn: A function which receives a problem name and
          creates a Gym environment for that problem (e.g. an Atari 2600 game).
      """
      logging.info("Creating ContinuousTrainRunner ...")
      super().__init__(base_dir, create_agent_fn, create_environment_fn)
      self._agent.eval_mode = False
  
imports: from typing import Optional
  from absl import logging
  from dopamine.discrete_domains import gym_lib
  from dopamine.discrete_domains import iteration_statistics
  from dopamine.discrete_domains import run_experiment
  from dopamine.jax.agents.dqn import dqn_agent
  from dopamine.jax.agents.sac import sac_agent
  from dopamine.labs.sac_from_pixels import deepmind_control_lib
  from dopamine.metrics import collector_dispatcher
  from dopamine.metrics import statistics_instance
  from flax.metrics import tensorboard
  import gin
  from gym import spaces
label_desc: Use image node_id 1 to create a new ContinuousTrainRunner object from inherited base classes: ContinuousRunner with example: obj = ContinuousTrainRunner(base_dir, create_agent_fn, create_environment_fn)