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: Runs one iteration of agent/environment interaction.
  
  An iteration involves running several episodes until a certain number of
  steps are obtained. This method differs from the `_run_one_iteration` method
  in the base `Runner` class in that it only runs the train phase.
  
  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",".","This","method","differs","from","the","`","_run_one_iteration","`","method","in","the","base","`","Runner","`","class","in","that","it","only","runs","the","train","phase",".","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. This method differs from the `_run_one_iteration` method
      in the base `Runner` class in that it only runs the train phase.
  
      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()
      (
          num_episodes_train,
          average_reward_train,
          average_steps_per_second,
      ) = self._run_train_phase(statistics)
  
      if self._has_collector_dispatcher:
          self._collector_dispatcher.write(
              [
                  statistics_instance.StatisticsInstance(
                      "Train/NumEpisodes", num_episodes_train, iteration
                  ),
                  statistics_instance.StatisticsInstance(
                      "Train/AverageReturns",
                      average_reward_train,
                      iteration,
                  ),
                  statistics_instance.StatisticsInstance(
                      "Train/AverageStepsPerSecond",
                      average_steps_per_second,
                      iteration,
                  ),
              ]
          )
      self._save_tensorboard_summaries(
          iteration,
          num_episodes_train,
          average_reward_train,
          average_steps_per_second,
      )
      return statistics.data_lists
  
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 2 for calling the ContinuousTrainRunner obj's underlying member method code with example usage: obj._run_one_iteration(iteration) and returns: statistics