class_docstr: Runner class to run Tandem RL experiments.
class_docstr_tok: ["Runner","class","to","run","Tandem","RL","experiments","."]
docstr: Runs one iteration of agent/environment interaction.
  
  An iteration involves running several episodes until a certain number of
  steps are obtained. The interleaving of train/eval phases implemented here
  are to match the implementation of (Mnih et al., 2015).
  
  Args:
    iteration: int, current iteration number, used as a global_step for saving
      Tensorboard summaries.
  
  Returns:
    A dict containing summary statistics for this iteration.
docstr_tok: ["Runs","one","iteration","of","agent\/environment","interaction",".","An","iteration","involves","running","several","episodes","until","a","certain","number","of","steps","are","obtained",".","The","interleaving","of","train\/eval","phases","implemented","here","are","to","match","the","implementation","of","(","Mnih","et","al.",",","2015",")",".","Args",":","iteration",":","int",",","current","iteration","number",",","used","as","a","global_step","for","saving","Tensorboard","summaries",".","Returns",":","A","dict","containing","summary","statistics","for","this","iteration","."]
code: def _run_one_iteration(self, iteration):
      """Runs one iteration of agent/environment interaction.
  
      An iteration involves running several episodes until a certain number of
      steps are obtained. The interleaving of train/eval phases implemented here
      are to match the implementation of (Mnih et al., 2015).
  
      Args:
        iteration: int, current iteration number, used as a global_step for saving
          Tensorboard summaries.
  
      Returns:
        A dict containing summary statistics for this iteration.
      """
      statistics = iteration_statistics.IterationStatistics()
      logging.info("Starting iteration %d", iteration)
      (
          num_episodes_train,
          average_reward_train,
          average_steps_per_second,
      ) = self._run_train_phase(statistics)
      (
          active_num_episodes_eval,
          active_average_reward_eval,
      ) = self._run_eval_phase(statistics, "active")
      (
          passive_num_episodes_eval,
          passive_average_reward_eval,
      ) = self._run_eval_phase(statistics, "passive")
  
      self._save_tensorboard_summaries(
          iteration,
          num_episodes_train,
          average_reward_train,
          active_num_episodes_eval,
          active_average_reward_eval,
          passive_num_episodes_eval,
          passive_average_reward_eval,
          average_steps_per_second,
      )
      return statistics.data_lists
  
imports: import sys
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.discrete_domains import gym_lib
  from dopamine.discrete_domains import iteration_statistics
  from dopamine.discrete_domains import run_experiment
  from dopamine.labs.environments.minatar import minatar_env
  from dopamine.labs.tandem_dqn import tandem_dqn_agent
  import gin
  import numpy
  import tensorflow
label_desc: Use image node_id 6 for calling the TandemRunner obj's underlying member method code with example usage: obj._run_one_iteration(iteration) and returns: statistics