class_docstr: Modified tests from dopamine run_experiment_test.py.
class_docstr_tok: ["Modified","tests","from","dopamine","run_experiment_test.py","."]
code: def testRunOneIteration(self):
      environment_steps = 2
      batch_size = self.batch_size
      envs = [
          MockEnvironment(max_steps=environment_steps)
          for _ in range(batch_size)
      ]
  
      environment = BatchEnv(envs)
  
      training_steps = 20 * batch_size
      evaluation_steps = 10 * batch_size
  
      runner = dopamine_connector.BatchRunner(
          self._test_subdir,
          self._create_agent_fn,
          create_environment_fn=lambda: environment,
          training_steps=training_steps,
          evaluation_steps=evaluation_steps,
      )
  
      dictionary = runner._run_one_iteration(1)
      train_rollouts = int(training_steps / environment_steps)
      eval_rollouts = int(evaluation_steps / environment_steps)
      expected_dictionary = {
          "train_episode_lengths": [2 for _ in range(train_rollouts)],
          "train_episode_returns": [-1 for _ in range(train_rollouts)],
          "train_average_return": [-1],
          "eval_episode_lengths": [2 for _ in range(eval_rollouts)],
          "eval_episode_returns": [-1 for _ in range(eval_rollouts)],
          "eval_average_return": [-1],
      }
      self.assertDictEqual(expected_dictionary, dictionary)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  from absl import flags
  from dopamine.discrete_domains import logger
  import mock
  import numpy
  from tensor2tensor.rl import dopamine_connector
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the BatchedRunnerTest obj's underlying member method code with example usage: obj.testRunOneIteration() without return types