docstr: :param test:
      A flag which specifies if the preset should be tested as part of the validation process.
  :param min_reward_threshold:
      The minimum reward that the agent should pass after max_episodes_to_achieve_reward episodes when the
      preset is run.
  :param max_episodes_to_achieve_reward:
      The maximum number of episodes that the agent should train using the preset in order to achieve the
      reward specified by min_reward_threshold.
  :param num_workers:
      The number of workers that should be used when running this preset in the test suite for validation.
  :param reward_test_level:
      The environment level or levels, given by a list of strings, that should be tested as part of the
      reward tests suite.
  :param test_using_a_trace_test:
      A flag that specifies if the preset should be run as part of the trace tests suite.
  :param trace_test_levels:
      The environment level or levels, given by a list of strings, that should be tested as part of the
      trace tests suite.
  :param trace_max_env_steps:
      An integer representing the maximum number of environment steps to run when running this preset as part
      of the trace tests suite.
  :param read_csv_tries:
      The number of retries to attempt for reading the experiment csv file, before declaring failure.
docstr_tok: [":","param","test",":","A","flag","which","specifies","if","the","preset","should","be","tested","as","part","of","the","validation","process",".",":","param","min_reward_threshold",":","The","minimum","reward","that","the","agent","should","pass","after","max_episodes_to_achieve_reward","episodes","when","the","preset","is","run",".",":","param","max_episodes_to_achieve_reward",":","The","maximum","number","of","episodes","that","the","agent","should","train","using","the","preset","in","order","to","achieve","the","reward","specified","by","min_reward_threshold",".",":","param","num_workers",":","The","number","of","workers","that","should","be","used","when","running","this","preset","in","the","test","suite","for","validation",".",":","param","reward_test_level",":","The","environment","level","or","levels",",","given","by","a","list","of","strings",",","that","should","be","tested","as","part","of","the","reward","tests","suite",".",":","param","test_using_a_trace_test",":","A","flag","that","specifies","if","the","preset","should","be","run","as","part","of","the","trace","tests","suite",".",":","param","trace_test_levels",":","The","environment","level","or","levels",",","given","by","a","list","of","strings",",","that","should","be","tested","as","part","of","the","trace","tests","suite",".",":","param","trace_max_env_steps",":","An","integer","representing","the","maximum","number","of","environment","steps","to","run","when","running","this","preset","as","part","of","the","trace","tests","suite",".",":","param","read_csv_tries",":","The","number","of","retries","to","attempt","for","reading","the","experiment","csv","file",",","before","declaring","failure","."]
code: def __init__(
      self,
      test=False,
      min_reward_threshold=0,
      max_episodes_to_achieve_reward=1,
      num_workers=1,
      reward_test_level=None,
      test_using_a_trace_test=True,
      trace_test_levels=None,
      trace_max_env_steps=5000,
      read_csv_tries=200,
  ):
      """
      :param test:
          A flag which specifies if the preset should be tested as part of the validation process.
      :param min_reward_threshold:
          The minimum reward that the agent should pass after max_episodes_to_achieve_reward episodes when the
          preset is run.
      :param max_episodes_to_achieve_reward:
          The maximum number of episodes that the agent should train using the preset in order to achieve the
          reward specified by min_reward_threshold.
      :param num_workers:
          The number of workers that should be used when running this preset in the test suite for validation.
      :param reward_test_level:
          The environment level or levels, given by a list of strings, that should be tested as part of the
          reward tests suite.
      :param test_using_a_trace_test:
          A flag that specifies if the preset should be run as part of the trace tests suite.
      :param trace_test_levels:
          The environment level or levels, given by a list of strings, that should be tested as part of the
          trace tests suite.
      :param trace_max_env_steps:
          An integer representing the maximum number of environment steps to run when running this preset as part
          of the trace tests suite.
      :param read_csv_tries:
          The number of retries to attempt for reading the experiment csv file, before declaring failure.
      """
      super().__init__()
  
      # setting a seed will only work for non-parallel algorithms. Parallel algorithms add uncontrollable noise in
      # the form of different workers starting at different times, and getting different assignments of CPU
      # time from the OS.
  
      # Testing parameters
      self.test = test
      self.min_reward_threshold = min_reward_threshold
      self.max_episodes_to_achieve_reward = (
          max_episodes_to_achieve_reward
      )
      self.num_workers = num_workers
      self.reward_test_level = reward_test_level
      self.test_using_a_trace_test = test_using_a_trace_test
      self.trace_test_levels = trace_test_levels
      self.trace_max_env_steps = trace_max_env_steps
      self.read_csv_tries = read_csv_tries
  
imports: import inspect
  import json
  import os
  import sys
  import types
  from collections import OrderedDict
  from enum import Enum
  from typing import Dict, List, Union
  from rl_coach.core_types import TrainingSteps, EnvironmentSteps, GradientClippingMethod, RunPhase, SelectedPhaseOnlyDumpFilter, MaxDumpFilter
  from rl_coach.filters.filter import NoInputFilter
  from rl_coach.logger import screen
label_desc: Use image node_id 1 to create a new PresetValidationParameters object from inherited base classes: Parameters with example: obj = PresetValidationParameters(test, min_reward_threshold, max_episodes_to_achieve_reward, num_workers, reward_test_level, test_using_a_trace_test, trace_test_levels, trace_max_env_steps, read_csv_tries)