class_docstr: Benchmark return tests for PPO Schulman17.
docstr: Run benchmark for a given environment.
  
  In order to execute ~1M environment steps to match the paper, we run 489
  iterations (num_iterations=489) which results in 1,001,472 environment
  steps. Each iteration results in 320 training steps and 2,048 environment
  steps. Thus 489 * 2,048 = 1,001,472 environment steps and
  489 * 320 = 156,480 training steps.
  
  Args:
    training_env: Name of environment to test.
    expected_min: The min expected return value.
    expected_max: The max expected return value.
docstr_tok: ["Run","benchmark","for","a","given","environment",".","In","order","to","execute","~1M","environment","steps","to","match","the","paper",",","we","run","489","iterations","(","num_iterations=489",")","which","results","in","1,001,472","environment","steps",".","Each","iteration","results","in","320","training","steps","and","2,048","environment","steps",".","Thus","489","*","2,048","=","1,001,472","environment","steps","and","489","*","320","=","156,480","training","steps",".","Args",":","training_env",":","Name","of","environment","to","test",".","expected_min",":","The","min","expected","return","value",".","expected_max",":","The","max","expected","return","value","."]
code: def run_benchmark(self, training_env, expected_min, expected_max):
      """Run benchmark for a given environment.
  
      In order to execute ~1M environment steps to match the paper, we run 489
      iterations (num_iterations=489) which results in 1,001,472 environment
      steps. Each iteration results in 320 training steps and 2,048 environment
      steps. Thus 489 * 2,048 = 1,001,472 environment steps and
      489 * 320 = 156,480 training steps.
  
      Args:
        training_env: Name of environment to test.
        expected_min: The min expected return value.
        expected_max: The max expected return value.
      """
      self.setUp()
      output_dir = self._get_test_output_dir("training_env")
      start_time_sec = time.time()
      bindings = [
          'schulman17.train_eval_lib.train_eval.env_name= "{}"'.format(
              training_env
          ),
          "schulman17.train_eval_lib.train_eval.eval_episodes = 100",
      ]
      gin.parse_config(bindings)
      ppo_clip_train_eval.ppo_clip_train_eval(
          output_dir, eval_interval=10000, num_iterations=489
      )
      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"
      )
  
      metric_1m = self.build_metric(
          "average_return_at_env_step1000000",
          values[1001472],
          min_value=expected_min,
          max_value=expected_max,
      )
  
      self.report_benchmark(
          wall_time=wall_time_sec, metrics=[metric_1m], extras={}
      )
      self._tearDown()
  
file_path: agents/tf_agents/benchmark/ppo_benchmark.py
imports: import os
  import time
  import gin
  import tensorflow
  from tf_agents.benchmark import utils
  from tf_agents.benchmark.perfzero_benchmark import PerfZeroBenchmark
  from tf_agents.examples.ppo.schulman17 import ppo_clip_train_eval
label_desc: Use image node_id 6 for calling the PpoSchulman17Return obj's underlying member method code with example usage: obj.run_benchmark(training_env, expected_min, expected_max) without return types