class_docstr: Benchmark return tests for DQN Mnih15.
docstr: Benchmarks to 3M Env steps.
  
  This is below the 12.5M train steps (50M frames) run by the paper to
  converge. Running 12.5M at the current throughput would take more than a
  week. 1-2 days is the max duration for a remotely usable test. 3M only
  confirms we have not regressed at 3M and does not gurantee convergence to 21
  at 12.5M.
code: def benchmark_pong_v0_at_3M(self):
      """Benchmarks to 3M Env steps.
  
      This is below the 12.5M train steps (50M frames) run by the paper to
      converge. Running 12.5M at the current throughput would take more than a
      week. 1-2 days is the max duration for a remotely usable test. 3M only
      confirms we have not regressed at 3M and does not gurantee convergence to 21
      at 12.5M.
      """
      self.setUp()
      output_dir = self._get_test_output_dir("pongAt3M")
      start_time_sec = time.time()
      dqn_train_eval_atari.train_eval(
          output_dir, eval_interval=10000, num_iterations=750000
      )
      wall_time_sec = time.time() - start_time_sec
      event_file = utils.find_event_log(
          os.path.join(output_dir, "eval")
      )
      values, _ = utils.extract_event_log_values(
          event_file, "Metrics/AverageReturn/EnvironmentSteps"
      )
      # Min/Max ranges are very large to only hard fail if very broken. The system
      # monitoring the results owns looking for anomalies.
      metric_3m = self.build_metric(
          "average_return_at_env_step3000000",
          values[3000000],
          min_value=-14,
          max_value=21,
      )
  
      self.report_benchmark(
          wall_time=wall_time_sec, metrics=[metric_3m], extras={}
      )
  
file_path: agents/tf_agents/benchmark/dqn_benchmark.py
imports: import os
  import time
  import tensorflow
  from tf_agents.benchmark import utils
  from tf_agents.benchmark.perfzero_benchmark import PerfZeroBenchmark
  from tf_agents.examples.dqn.mnih15 import dqn_train_eval_atari
label_desc: Use image node_id 2 for calling the DqnMnih15Return obj's underlying member method code with example usage: obj.benchmark_pong_v0_at_3M() without return types