class_docstr: Runner for evaluating using a fixed number of episodes rather than steps.
docstr: Runs the agent/environment loop until a desired number of steps.
  
  We follow the Machado et al., 2017 convention of running full episodes,
  and terminating once we've run a minimum number of steps.
  
  Args:
    max_episodes: int, fixed number of episodes to generate in this phase.
    statistics: `IterationStatistics` object which records the experimental
      results.
    run_mode_str: str, describes the run mode for this agent.
  
  Returns:
    Tuple containing the number of steps taken in this phase (int), the sum of
      returns (float), and the number of episodes performed (int).
code: def _run_one_phase_fix_episodes(
      self, max_episodes, statistics, run_mode_str
  ):
      """Runs the agent/environment loop until a desired number of steps.
  
      We follow the Machado et al., 2017 convention of running full episodes,
      and terminating once we've run a minimum number of steps.
  
      Args:
        max_episodes: int, fixed number of episodes to generate in this phase.
        statistics: `IterationStatistics` object which records the experimental
          results.
        run_mode_str: str, describes the run mode for this agent.
  
      Returns:
        Tuple containing the number of steps taken in this phase (int), the sum of
          returns (float), and the number of episodes performed (int).
      """
      step_count = 0
      num_episodes = 0
      sum_returns = 0.0
  
      while num_episodes < max_episodes:
          episode_length, episode_return = self._run_one_episode()
          statistics.append(
              {
                  "{}_episode_lengths".format(
                      run_mode_str
                  ): episode_length,
                  "{}_episode_returns".format(
                      run_mode_str
                  ): episode_return,
              }
          )
          step_count += episode_length
          sum_returns += episode_return
          num_episodes += 1
          # We use sys.stdout.write instead of logging so as to flush frequently
          # without generating a line break.
          sys.stdout.write(
              "Steps executed: {} ".format(step_count)
              + "Episode length: {} ".format(episode_length)
              + "Num episodes: {} ".format(num_episodes)
              + "Return: {}\r".format(episode_return)
          )
          sys.stdout.flush()
      return step_count, sum_returns, num_episodes
  
file_path: dopamine/dopamine/labs/atari_100k/eval_run_experiment.py
imports: import sys
  from absl import logging
  from dopamine.discrete_domains import run_experiment
  import gin
  import jax
label_desc: Use image node_id 4 for calling the MaxEpisodeEvalRunner obj's underlying member method code with example usage: obj._run_one_phase_fix_episodes(max_episodes, statistics, run_mode_str) and returns: step_count,  sum_returns,  num_episodes