class_docstr: Runner for evaluating using a fixed number of episodes rather than steps.
  
  Also restricts data collection to a strict cap,
  following conventions in data-efficient RL research.
class_docstr_tok: ["Runner","for","evaluating","using","a","fixed","number","of","episodes","rather","than","steps",".","Also","restricts","data","collection","to","a","strict","cap",",","following","conventions","in","data-efficient","RL","research","."]
docstr: Specify the number of evaluation episodes.
docstr_tok: ["Specify","the","number","of","evaluation","episodes","."]
code: def __init__(
      self,
      base_dir,
      create_agent_fn,
      game_name=None,
      create_environment_fn=atari_lib.create_atari_environment,
      num_eval_episodes=100,
      max_noops=30,
      parallel_eval=True,
      num_eval_envs=100,
      num_train_envs=1,
      eval_one_to_one=True,
      log_normalized_scores=False,
  ):
      """Specify the number of evaluation episodes."""
      if game_name is not None:
          create_environment_fn = functools.partial(
              create_environment_fn, game_name=game_name
          )
          self.game_name = (
              game_name.lower().replace("_", "").replace(" ", "")
          )
  
          if log_normalized_scores:
              raise ValueError(
                  "Game name must not be None if logging normalized scores."
              )
      super().__init__(
          base_dir,
          create_agent_fn,
          create_environment_fn=create_environment_fn,
      )
  
      self._num_iterations = int(self._num_iterations)
      self._start_iteration = int(self._start_iteration)
  
      self._num_eval_episodes = num_eval_episodes
      logging.info("Num evaluation episodes: %d", num_eval_episodes)
      self._evaluation_steps = None
      self.num_steps = 0
      self.total_steps = self._training_steps * self._num_iterations
      self.create_environment_fn = create_env_wrapper(
          create_environment_fn
      )
  
      self.max_noops = max_noops
      self.parallel_eval = parallel_eval
      self.num_eval_envs = num_eval_envs
      self.num_train_envs = num_train_envs
      self.eval_one_to_one = eval_one_to_one
  
      self.train_envs = [
          self.create_environment_fn() for i in range(num_train_envs)
      ]
      self.train_state = None
      self._agent.reset_all(self._initialize_episode(self.train_envs))
      self._agent.cache_train_state()
  
      self.log_normalized_scores = log_normalized_scores
      # Create a collector dispatcher for metrics reporting.
      self._collector_dispatcher = (
          collector_dispatcher.CollectorDispatcher(self._base_dir)
      )
      set_collector_dispatcher_fn = getattr(
          self._agent, "set_collector_dispatcher", None
      )
      if callable(set_collector_dispatcher_fn):
          set_collector_dispatcher_fn(self._collector_dispatcher)
  
imports: import functools
  import os
  import sys
  import time
  from absl import logging
  from dopamine.discrete_domains import atari_lib
  from dopamine.discrete_domains import iteration_statistics
  from dopamine.discrete_domains import run_experiment
  from dopamine.labs.atari_100k import normalization_utils
  from dopamine.metrics import collector_dispatcher
  from dopamine.metrics import statistics_instance
  import gin
  import jax
  import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new DataEfficientAtariRunner object from inherited base classes: run_experiment with example: obj = DataEfficientAtariRunner(base_dir, create_agent_fn, game_name, create_environment_fn, num_eval_episodes, max_noops, parallel_eval, num_eval_envs, num_train_envs, eval_one_to_one, log_normalized_scores)