Return scenario object with default values.
Usage
defaultScenario(scenario = list(), params_def = .irace.params.def)Arguments
- scenario
list()
Data structure containing irace settings. The data structure has to be the one returned by the functiondefaultScenario()orreadScenario().- params_def
data.frame()
Definition of the options accepted by the scenario. This should only be modified by packages that wish to extend irace.
Value
A list indexed by the irace parameter names, containing the default values for each parameter, except for those already present in the scenario passed as argument. The scenario list contains the following elements:
General options:
scenarioFilePath of the file that describes the configuration scenario setup and other irace settings. (Default:
"./scenario.txt")execDirDirectory where the programs will be run. (Default:
"./")logFileFile to save tuning results as an R dataset, either absolute path or relative to execDir. (Default:
"./irace.Rdata")quietReduce the output generated by irace to a minimum. (Default:
0)debugLevelDebug level of the output of
irace. Set this to 0 to silence all debug messages. Higher values (1, 2 or 3) provide more verbose debug messages. (Default:0)seedSeed of the random number generator (by default, generate a random seed). (Default:
NA)repairConfigurationUser-defined R function that takes a configuration generated by irace and repairs it. (Default:
"")postselectionPerform a postselection race after the execution of irace to consume all remaining budget. Value 0 disables the postselection race. (Default:
1)aclibEnable/disable AClib mode. This option enables compatibility with GenericWrapper4AC as targetRunner script. (Default:
0)
Elitist
irace:elitistEnable/disable elitist irace. (Default:
1)elitistNewInstancesNumber of instances added to the execution list before previous instances in elitist irace. (Default:
1)elitistLimitIn elitist irace, maximum number per race of elimination tests that do not eliminate a configuration. Use 0 for no limit. (Default:
2)
Internal
iraceoptions:sampleInstancesRandomly sample the training instances or use them in the order given. (Default:
1)softRestartEnable/disable the soft restart strategy that avoids premature convergence of the probabilistic model. (Default:
1)softRestartThresholdSoft restart threshold value for numerical parameters. (Default:
1e-04)nbIterationsMaximum number of iterations. (Default:
0)nbExperimentsPerIterationNumber of runs of the target algorithm per iteration. (Default:
0)minNbSurvivalMinimum number of configurations needed to continue the execution of each race (iteration). (Default:
0)nbConfigurationsNumber of configurations to be sampled and evaluated at each iteration. (Default:
0)muParameter used to define the number of configurations sampled and evaluated at each iteration. (Default:
5)
Target algorithm parameters:
parameterFileFile that contains the description of the parameters of the target algorithm. (Default:
"./parameters.txt")parametersParameters space object (usually read from a file using
readParameters). (Default:"")
Target algorithm execution:
targetRunnerExecutable called for each configuration that executes the target algorithm to be tuned. See the templates and examples provided. (Default:
"./target-runner")targetRunnerLauncherExecutable that will be used to launch the target runner, when
targetRunnercannot be executed directly (e.g., a Python script in Windows). (Default:"")targetCmdlineCommand-line arguments provided to
targetRunner(ortargetRunnerLauncherif defined). The substrings\{configurationID\},\{instanceID\},\{seed\},\{instance\}, and\{bound\}will be replaced by their corresponding values. The substring\{targetRunnerArgs\}will be replaced by the concatenation of the switch and value of all active parameters of the particular configuration being evaluated. The substring\{targetRunner\}, if present, will be replaced by the value oftargetRunner(useful when usingtargetRunnerLauncher). (Default:"{configurationID} {instanceID} {seed} {instance} {bound} {targetRunnerArgs}")targetRunnerRetriesNumber of times to retry a call to
targetRunnerif the call failed. (Default:0)targetRunnerTimeoutTimeout in seconds of any
targetRunnercall (only applies totarget-runnerexecutables not to R functions), ignored if 0. (Default:0)targetRunnerDataOptional data passed to
targetRunner. This is ignored by the defaulttargetRunnerfunction, but it may be used by customtargetRunnerfunctions to pass persistent data around. (Default:"")targetRunnerParallelOptional R function to provide custom parallelization of
targetRunner. (Default:"")targetEvaluatorOptional script or R function that provides a numeric value for each configuration. See templates/target-evaluator.tmpl (Default:
"")deterministicIf the target algorithm is deterministic, configurations will be evaluated only once per instance. (Default:
0)parallelNumber of calls to
targetRunnerto execute in parallel. Values0or1mean no parallelization. (Default:0)loadBalancingEnable/disable load-balancing when executing experiments in parallel. Load-balancing makes better use of computing resources, but increases communication overhead. If this overhead is large, disabling load-balancing may be faster. (Default:
1)mpiEnable/disable MPI. Use
Rmpito executetargetRunnerin parallel (parameterparallelis the number of slaves). (Default:0)batchmodeSpecify how irace waits for jobs to finish when
targetRunnersubmits jobs to a batch cluster: sge, pbs, torque, slurm or htcondor.targetRunnermust submit jobs to the cluster using, for example,qsub. (Default:0)
Initial configurations:
initConfigurationsData frame describing initial configurations (usually read from a file using
readConfigurations). (Default:"")configurationsFileFile that contains a table of initial configurations. If empty or
NULL, all initial configurations are randomly generated. (Default:"")
Training instances:
instancesCharacter vector of the instances to be used in the
targetRunner. (Default:"")trainInstancesDirDirectory where training instances are located; either absolute path or relative to current directory. If no
trainInstancesFilesis provided, all the files intrainInstancesDirwill be listed as instances. (Default:"")trainInstancesFileFile that contains a list of training instances and optionally additional parameters for them. If
trainInstancesDiris provided,iracewill search for the files in this folder. (Default:"")blockSizeNumber of training instances, that make up a 'block' in
trainInstancesFile. Elimination of configurations will only be performed after evaluating a complete block and never in the middle of a block. Each block typically contains one instance from each instance class (type or family) and the block size is the number of classes. The value ofblockSizewill multiplyfirstTest,eachTestandelitistNewInstances. (Default:1)
Tuning budget:
maxExperimentsMaximum number of runs (invocations of
targetRunner) that will be performed. It determines the maximum budget of experiments for the tuning. (Default:0)minExperimentsMinimum number of runs (invocations of
targetRunner) that will be performed. It determines the minimum budget of experiments for the tuning. The actual budget depends on the number of parameters andminSurvival. (Default:NA)maxTimeMaximum total execution time for the executions of
targetRunner.targetRunnermust return two values: cost and time. This value and the one returned bytargetRunnermust use the same units (seconds, minutes, iterations, evaluations, ...). (Default:0)budgetEstimationFraction (smaller than 1) of the budget used to estimate the mean computation time of a configuration. Only used when
maxTime> 0 (Default:0.05)minMeasurableTimeMinimum time unit that is still (significantly) measureable. (Default:
0.01)
Statistical test:
testTypeStatistical test used for elimination. The default value selects
t-testifcappingis enabled orF-test, otherwise. Valid values are: F-test (Friedman test), t-test (pairwise t-tests with no correction), t-test-bonferroni (t-test with Bonferroni's correction for multiple comparisons), t-test-holm (t-test with Holm's correction for multiple comparisons). (Default:"")firstTestNumber of instances evaluated before the first elimination test. It must be a multiple of
eachTest. (Default:5)eachTestNumber of instances evaluated between elimination tests. (Default:
1)confidenceConfidence level for the elimination test. (Default:
0.95)
Adaptive capping:
cappingEnable the use of adaptive capping, a technique designed for minimizing the computation time of configurations. Capping is enabled by default if
elitistis active,maxTime > 0andboundMax > 0. (Default:NA)cappingAfterFirstTestIf set to 1, elimination due to capping only happens after
firstTestinstances are seen. (Default:0)cappingTypeMeasure used to obtain the execution bound from the performance of the elite configurations.
mean: Mean performance of the elite configurations.
best: Best performance of the elite configurations.
worst: Worst performance of the elite configurations.
(Default:
"median")boundTypeMethod to calculate the mean performance of elite configurations.
instance: Execution time of the current instance.
(Default:
"candidate")boundMaxMaximum execution bound for
targetRunner. It must be specified when capping is enabled. (Default:0)boundDigitsPrecision used for calculating the execution time. It must be specified when capping is enabled. (Default:
0)boundParPenalization multiplication constant (PARX) for timed out executions (executions that reach
boundMaxexecution time). (Default:1)boundAsTimeoutReplace the configuration cost of bounded executions with
boundMax. (Default:1)
Recovery:
recoveryFilePreviously saved log file to recover the execution of
irace, either absolute path or relative to the current directory. If empty orNULL, recovery is not performed. (Default:"")
Testing:
testInstancesDirDirectory where testing instances are located, either absolute or relative to current directory. (Default:
"")testInstancesFileFile containing a list of test instances and optionally additional parameters for them. (Default:
"")testInstancesCharacter vector of the instances to be used in the
targetRunnerwhen executing the testing. (Default:"")testNbElitesNumber of elite configurations returned by irace that will be tested if test instances are provided. (Default:
1)testIterationElitesEnable/disable testing the elite configurations found at each iteration. (Default:
0)
See also
readScenario()for reading a configuration scenario from a file.
printScenario()prints the given scenario.
defaultScenario()returns the default scenario settings of irace.
checkScenario()to check that the scenario is valid.