def __init__(self, path=None, environment=None, revision_cache=None): """ See :class:`lab.experiment.Experiment` for an explanation of the *path* and *environment* parameters. *revision_cache* is the directory for caching Fast Downward revisions. It defaults to ``<scriptdir>/data/revision-cache``. This directory can become very large since each revision uses about 30 MB. >>> from lab.environments import BaselSlurmEnvironment >>> env = BaselSlurmEnvironment(email="*****@*****.**") >>> exp = FastDownwardExperiment(environment=env) You can add parsers with :meth:`.add_parser()`. See :ref:`parsing` for how to write custom parsers and :ref:`downward-parsers` for the list of built-in parsers. Which parsers you should use depends on the algorithms you're running. For single-search experiments, we recommend adding the following parsers in this order: >>> exp.add_parser(exp.EXITCODE_PARSER) >>> exp.add_parser(exp.TRANSLATOR_PARSER) >>> exp.add_parser(exp.SINGLE_SEARCH_PARSER) >>> exp.add_parser(exp.PLANNER_PARSER) """ Experiment.__init__(self, path=path, environment=environment) self.revision_cache = revision_cache or os.path.join( get_default_data_dir(), 'revision-cache') self._suites = defaultdict(list) # Use OrderedDict to ensure that names are unique and ordered. self._algorithms = OrderedDict() self.add_command('remove-output-sas', ['rm', '-f', 'output.sas'])
def __init__(self, path=None, environment=None, revision_cache=None): """ See :class:`lab.experiment.Experiment` for an explanation of the *path* and *environment* parameters. *revision_cache* is the directory for caching Fast Downward revisions. It defaults to ``<scriptdir>/data/revision-cache``. This directory can become very large since each revision uses about 30 MB. >>> from lab.environments import MaiaEnvironment >>> env = MaiaEnvironment(priority=-2) >>> exp = FastDownwardExperiment(environment=env) """ Experiment.__init__(self, path=path, environment=environment) self.revision_cache = revision_cache or os.path.join( get_default_data_dir(), 'revision-cache') self._suites = defaultdict(list) # Use OrderedDict to ensure that names are unique and ordered. self._algorithms = OrderedDict()
def __init__( self, suites, num_runs=30, time_per_step=1.0, initial_port=2000, rddlsim_seed=0, rddlsim_enforces_runtime=False, revision_cache=None, time_buffer=300, memory_limit=int(3.5 * 1024), soft_stdout_limit=10 * 1024, hard_stdout_limit=20 * 1024, soft_stderr_limit=64, hard_stderr_limit=10 * 1024, path=None, environment=None, ): """ *suites* is a list of :class:'prostlab.suites.Problem' objects that describes the set of benchmarks used in the experiment. *num_runs* is the number of times each algorithm is executed on each instance. *time_per_step* is the time in seconds each algorithm has per step. A total time per instance is computed from this, the *num_runs*, the instance horizon and the *time_buffer*. *initial_port* is the first port that is used for TCP/IP communication between an algorithm and rddlsim. *rddlsim_seed* is the value with which rddlsim is seeded. If *rddlsim_enforces_runtime* is True, rddlsim terminates after the time that is computed as the product of *num_runs*, *time_per_step* and the instance horizon. *revision_cache* is the directory for caching Prost revisions. It defaults to ``<scriptdir>/data/revision-cache``. *time_buffer* is the time that is allows in addtion to the product of *num_runs*, *time_per_step* and the instance horizon. This must include the time the parser requires. *memory_limit* is the hard memory limit in MiB. *memory_limit* - 512 MiB is furthermore passed as a (soft) memory limit to Prost. *soft_stdout_limit*, *hard_stdout_limit*, *soft_stderr_limit* and *hard_stderr_limit* limit the amount of data each experiment may write to disk, See :class:`lab.experiment.Experiment` for an explanation of the *path* and *environment* parameters. >>> from lab.environments import BaselSlurmEnvironment >>> env = BaselSlurmEnvironment(email="*****@*****.**") >>> exp = ProstExperiment(environment=env) You can add parsers with :meth:`.add_parser()`. See :ref:`parsing` for how to write custom parsers. """ Experiment.__init__(self, path=path, environment=environment) self.suites = suites self.num_runs = num_runs self.time_per_step = time_per_step self.initial_port = initial_port self.rddlsim_seed = rddlsim_seed self.rddlsim_enforces_runtime = rddlsim_enforces_runtime self.revision_cache = revision_cache or os.path.join( get_default_data_dir(), "revision-cache") self.time_buffer = time_buffer self.memory_limit = memory_limit self.soft_stdout_limit = soft_stdout_limit self.hard_stdout_limit = hard_stdout_limit self.soft_stderr_limit = soft_stderr_limit self.hard_stderr_limit = hard_stderr_limit # Use OrderedDict to ensure that names are unique and ordered. self.configs = OrderedDict()