Last updated on 2020-03-29 15:50:53 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 3.3 | ERROR | ||||
r-devel-linux-x86_64-debian-gcc | 3.3 | 6.56 | 53.16 | 59.72 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 3.3 | 93.36 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 3.3 | 91.30 | ERROR | |||
r-devel-windows-ix86+x86_64 | 3.3 | 18.00 | 78.00 | 96.00 | ERROR | |
r-devel-windows-ix86+x86_64-gcc8 | 3.3 | 14.00 | 98.00 | 112.00 | OK | |
r-patched-linux-x86_64 | 3.3 | 7.46 | 67.11 | 74.57 | ERROR | |
r-patched-solaris-x86 | 3.3 | 117.50 | ERROR | |||
r-release-linux-x86_64 | 3.3 | 7.53 | 73.73 | 81.26 | OK | |
r-release-windows-ix86+x86_64 | 3.3 | 15.00 | 119.00 | 134.00 | OK | |
r-release-osx-x86_64 | 3.3 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 3.3 | 14.00 | 114.00 | 128.00 | OK | |
r-oldrel-osx-x86_64 | 3.3 | NOTE |
Version: 3.3
Check: examples
Result: ERROR
Running examples in 'irace-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-27 00:17:56 CET: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/irace.Rcheck/parameters.txt"
execDir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-27 00:17:56 CET: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 3.3
Check: tests
Result: ERROR
Running 'testthat.R' [3s/4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(irace)
> test_check("irace", reporter = c("summary","check"))
GenericWrapper4AC: S
bugs: S......
Capping: 1-- 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ------------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
2-- 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) -----------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
Test forbidden: ..
irace: 3-- 3. Error: maxTime 500 (@test-maxTime.R#35) ---------------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
mlr: S
path.rel2abs: S........................................................................................................
irace: S4-- 4. Error: parallel reject (@test-sann-irace.R#97) --------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...)
2. irace::irace(scenario = scenario, parameters = parameters)
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
SS
similarConfigurations: 5-- 5. Error: similarConfigurations (@test-similar.R#28) -----------------------
invalid argument type
Backtrace:
1. testthat::expect_identical(...)
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
targetRunnerParallel: 6-- 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) -----------
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters)
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
7-- 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ---------------
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...)
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
targeteval: 8-- 8. Error: target.evaluator (@test-targeteval.R#27) -------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
== Skipped =====================================================================
1. GenericWrapper4AC (@test-GenericWrapper4AC.R#5) - Reason: On CRAN
2. bug_large_new_instances (@test-bugs.R#4) - Reason: On CRAN
3. cap.irace targetRunner = target.runner.reject, maxTime = 10000 (@test-capping.R#171) - Reason: On CRAN
4. maxTime 500 (@test-maxTime.R#39) - Reason: On CRAN
5. mlr (@test-mlr.R#4) - Reason: On CRAN
6. test.path.rel2abs (@test-path.R#9) - Reason: Error in setwd("/x"): cannot change working directory
7. parallel (@test-sann-irace.R#85) - Reason: On CRAN
8. deterministic (@test-sann-irace.R#101) - Reason: On CRAN
9. log (@test-sann-irace.R#109) - Reason: On CRAN
== Failed ======================================================================
-- 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ------------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000) test-capping.R:162:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) -----------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000) test-capping.R:167:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 3. Error: maxTime 500 (@test-maxTime.R#35) ---------------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500) test-maxTime.R:35:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-maxTime.R:26:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 4. Error: parallel reject (@test-sann-irace.R#97) --------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...) test-sann-irace.R:97:2
2. irace::irace(scenario = scenario, parameters = parameters) test-sann-irace.R:77:2
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 5. Error: similarConfigurations (@test-similar.R#28) -----------------------
invalid argument type
Backtrace:
1. testthat::expect_identical(...) test-similar.R:28:2
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
-- 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) -----------
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters) test-targetRunnerParallel.R:36:3
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ---------------
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...) test-targetRunnerParallel.R:54:2
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 8. Error: target.evaluator (@test-targeteval.R#27) -------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-targeteval.R:27:3
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
== DONE ========================================================================
== testthat results ===========================================================
[ OK: 112 | SKIPPED: 9 | WARNINGS: 0 | FAILED: 8 ]
1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162)
2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167)
3. Error: maxTime 500 (@test-maxTime.R#35)
4. Error: parallel reject (@test-sann-irace.R#97)
5. Error: similarConfigurations (@test-similar.R#28)
6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36)
7. Error: targetRunnerData (@test-targetRunnerParallel.R#54)
8. Error: target.evaluator (@test-targeteval.R#27)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 3.3
Check: examples
Result: ERROR
Running examples in ‘irace-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-28 21:32:12 CET: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/irace.Rcheck/parameters.txt"
execDir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-28 21:32:12 CET: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 3.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [2s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(irace)
> test_check("irace", reporter = c("summary","check"))
GenericWrapper4AC: S
bugs: S......
Capping: 1── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
2── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
Test forbidden: ..
irace: 3── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
mlr: S
path.rel2abs: S........................................................................................................
irace: S4── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...)
2. irace::irace(scenario = scenario, parameters = parameters)
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
SS
similarConfigurations: 5── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...)
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
targetRunnerParallel: 6── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters)
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
7── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...)
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
targeteval: 8── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ Skipped ═════════════════════════════════════════════════════════════════════
1. GenericWrapper4AC (@test-GenericWrapper4AC.R#5) - Reason: On CRAN
2. bug_large_new_instances (@test-bugs.R#4) - Reason: On CRAN
3. cap.irace targetRunner = target.runner.reject, maxTime = 10000 (@test-capping.R#171) - Reason: On CRAN
4. maxTime 500 (@test-maxTime.R#39) - Reason: On CRAN
5. mlr (@test-mlr.R#4) - Reason: On CRAN
6. test.path.rel2abs (@test-path.R#9) - Reason: Error in setwd("/x"): cannot change working directory
7. parallel (@test-sann-irace.R#85) - Reason: On CRAN
8. deterministic (@test-sann-irace.R#101) - Reason: On CRAN
9. log (@test-sann-irace.R#109) - Reason: On CRAN
══ Failed ══════════════════════════════════════════════════════════════════════
── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000) test-capping.R:162:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000) test-capping.R:167:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500) test-maxTime.R:35:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-maxTime.R:26:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...) test-sann-irace.R:97:2
2. irace::irace(scenario = scenario, parameters = parameters) test-sann-irace.R:77:2
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...) test-similar.R:28:2
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters) test-targetRunnerParallel.R:36:3
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...) test-targetRunnerParallel.R:54:2
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-targeteval.R:27:3
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ DONE ════════════════════════════════════════════════════════════════════════
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 112 | SKIPPED: 9 | WARNINGS: 0 | FAILED: 8 ]
1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162)
2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167)
3. Error: maxTime 500 (@test-maxTime.R#35)
4. Error: parallel reject (@test-sann-irace.R#97)
5. Error: similarConfigurations (@test-similar.R#28)
6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36)
7. Error: targetRunnerData (@test-targetRunnerParallel.R#54)
8. Error: target.evaluator (@test-targeteval.R#27)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 3.3
Check: examples
Result: ERROR
Running examples in ‘irace-Ex.R’ failed
The error most likely occurred in:
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-28 18:35:14 GMT: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/data/gannet/ripley/R/packages/tests-clang/irace.Rcheck/parameters.txt"
execDir = "/data/gannet/ripley/R/packages/tests-clang/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/data/gannet/ripley/R/packages/tests-clang/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-28 18:35:14 GMT: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 3.3
Check: tests
Result: ERROR
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(irace)
> test_check("irace", reporter = c("summary","check"))
GenericWrapper4AC: S
bugs: S......
Capping: 1── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
2── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
Test forbidden: ..
irace: 3── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
mlr: S
path.rel2abs: S........................................................................................................
irace: S4── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...)
2. irace::irace(scenario = scenario, parameters = parameters)
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
SS
similarConfigurations: 5── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...)
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
targetRunnerParallel: 6── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters)
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
7── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...)
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
targeteval: 8── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ Skipped ═════════════════════════════════════════════════════════════════════
1. GenericWrapper4AC (@test-GenericWrapper4AC.R#5) - Reason: On CRAN
2. bug_large_new_instances (@test-bugs.R#4) - Reason: On CRAN
3. cap.irace targetRunner = target.runner.reject, maxTime = 10000 (@test-capping.R#171) - Reason: On CRAN
4. maxTime 500 (@test-maxTime.R#39) - Reason: On CRAN
5. mlr (@test-mlr.R#4) - Reason: On CRAN
6. test.path.rel2abs (@test-path.R#9) - Reason: Error in setwd("/x"): cannot change working directory
7. parallel (@test-sann-irace.R#85) - Reason: On CRAN
8. deterministic (@test-sann-irace.R#101) - Reason: On CRAN
9. log (@test-sann-irace.R#109) - Reason: On CRAN
══ Failed ══════════════════════════════════════════════════════════════════════
── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000) test-capping.R:162:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000) test-capping.R:167:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500) test-maxTime.R:35:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-maxTime.R:26:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...) test-sann-irace.R:97:2
2. irace::irace(scenario = scenario, parameters = parameters) test-sann-irace.R:77:2
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...) test-similar.R:28:2
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters) test-targetRunnerParallel.R:36:3
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...) test-targetRunnerParallel.R:54:2
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-targeteval.R:27:3
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ DONE ════════════════════════════════════════════════════════════════════════
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 112 | SKIPPED: 9 | WARNINGS: 0 | FAILED: 8 ]
1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162)
2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167)
3. Error: maxTime 500 (@test-maxTime.R#35)
4. Error: parallel reject (@test-sann-irace.R#97)
5. Error: similarConfigurations (@test-similar.R#28)
6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36)
7. Error: targetRunnerData (@test-targetRunnerParallel.R#54)
8. Error: target.evaluator (@test-targeteval.R#27)
Error: testthat unit tests failed
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86
Version: 3.3
Check: examples
Result: ERROR
Running examples in ‘irace-Ex.R’ failed
The error most likely occurred in:
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-26 11:32:44 GMT: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/data/gannet/ripley/R/packages/tests-devel/irace.Rcheck/parameters.txt"
execDir = "/data/gannet/ripley/R/packages/tests-devel/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/data/gannet/ripley/R/packages/tests-devel/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-26 11:32:44 GMT: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 3.3
Check: examples
Result: ERROR
Running examples in 'irace-Ex.R' failed
The error most likely occurred in:
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-19 07:54:22 CET: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "d:/Rcompile/CRANpkg/local/4.0/irace.Rcheck/parameters.txt"
execDir = "D:/RCompile/CRANpkg/local/4.0/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file 'd:/Rcompile/CRANpkg/local/4.0/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-19 07:54:22 CET: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-devel-windows-ix86+x86_64
Version: 3.3
Check: tests
Result: ERROR
Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(irace)
> test_check("irace", reporter = c("summary","check"))
GenericWrapper4AC: S
bugs: S......
Capping: 1-- 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ------------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
2-- 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) -----------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
Test forbidden: ..
irace: 3-- 3. Error: maxTime 500 (@test-maxTime.R#35) ---------------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
mlr: S
path.rel2abs: S........................................................................................................
irace: S4-- 4. Error: parallel reject (@test-sann-irace.R#97) --------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...)
2. irace::irace(scenario = scenario, parameters = parameters)
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
SS
similarConfigurations: 5-- 5. Error: similarConfigurations (@test-similar.R#28) -----------------------
invalid argument type
Backtrace:
1. testthat::expect_identical(...)
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
targetRunnerParallel: 6-- 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) -----------
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters)
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
7-- 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ---------------
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...)
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
targeteval: 8-- 8. Error: target.evaluator (@test-targeteval.R#27) -------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
== Skipped =====================================================================
1. GenericWrapper4AC (@test-GenericWrapper4AC.R#5) - Reason: On CRAN
2. bug_large_new_instances (@test-bugs.R#4) - Reason: On CRAN
3. cap.irace targetRunner = target.runner.reject, maxTime = 10000 (@test-capping.R#171) - Reason: On CRAN
4. maxTime 500 (@test-maxTime.R#39) - Reason: On CRAN
5. mlr (@test-mlr.R#4) - Reason: On CRAN
6. test.path.rel2abs (@test-path.R#9) - Reason: Error in setwd("/x"): cannot change working directory
7. parallel (@test-sann-irace.R#85) - Reason: On CRAN
8. deterministic (@test-sann-irace.R#101) - Reason: On CRAN
9. log (@test-sann-irace.R#109) - Reason: On CRAN
== Failed ======================================================================
-- 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ------------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000) test-capping.R:162:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) -----------
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000) test-capping.R:167:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 3. Error: maxTime 500 (@test-maxTime.R#35) ---------------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500) test-maxTime.R:35:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-maxTime.R:26:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 4. Error: parallel reject (@test-sann-irace.R#97) --------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...) test-sann-irace.R:97:2
2. irace::irace(scenario = scenario, parameters = parameters) test-sann-irace.R:77:2
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 5. Error: similarConfigurations (@test-similar.R#28) -----------------------
invalid argument type
Backtrace:
1. testthat::expect_identical(...) test-similar.R:28:2
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
-- 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) -----------
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters) test-targetRunnerParallel.R:36:3
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ---------------
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...) test-targetRunnerParallel.R:54:2
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
-- 8. Error: target.evaluator (@test-targeteval.R#27) -------------------------
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-targeteval.R:27:3
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
== DONE ========================================================================
== testthat results ===========================================================
[ OK: 112 | SKIPPED: 9 | WARNINGS: 0 | FAILED: 8 ]
1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162)
2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167)
3. Error: maxTime 500 (@test-maxTime.R#35)
4. Error: parallel reject (@test-sann-irace.R#97)
5. Error: similarConfigurations (@test-similar.R#28)
6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36)
7. Error: targetRunnerData (@test-targetRunnerParallel.R#54)
8. Error: target.evaluator (@test-targeteval.R#27)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-windows-ix86+x86_64
Version: 3.3
Check: examples
Result: ERROR
Running examples in ‘irace-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-27 15:41:55 CET: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/irace.Rcheck/parameters.txt"
execDir = "/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-27 15:41:55 CET: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-patched-linux-x86_64
Version: 3.3
Check: tests
Result: ERROR
Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(irace)
> test_check("irace", reporter = c("summary","check"))
GenericWrapper4AC: S
bugs: S......
Capping: 1── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
2── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
Test forbidden: ..
irace: 3── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500)
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
S
mlr: S
path.rel2abs: S........................................................................................................
irace: S4── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...)
2. irace::irace(scenario = scenario, parameters = parameters)
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
SS
similarConfigurations: 5── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...)
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
targetRunnerParallel: 6── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters)
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
7── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...)
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
targeteval: 8── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters)
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ Skipped ═════════════════════════════════════════════════════════════════════
1. GenericWrapper4AC (@test-GenericWrapper4AC.R#5) - Reason: On CRAN
2. bug_large_new_instances (@test-bugs.R#4) - Reason: On CRAN
3. cap.irace targetRunner = target.runner.reject, maxTime = 10000 (@test-capping.R#171) - Reason: On CRAN
4. maxTime 500 (@test-maxTime.R#39) - Reason: On CRAN
5. mlr (@test-mlr.R#4) - Reason: On CRAN
6. test.path.rel2abs (@test-path.R#9) - Reason: Error in setwd("/x"): cannot change working directory
7. parallel (@test-sann-irace.R#85) - Reason: On CRAN
8. deterministic (@test-sann-irace.R#101) - Reason: On CRAN
9. log (@test-sann-irace.R#109) - Reason: On CRAN
══ Failed ══════════════════════════════════════════════════════════════════════
── 1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162) ────────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxExperiments = 1000) test-capping.R:162:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167) ───────────
invalid subscript type 'list'
Backtrace:
1. irace:::cap.irace(maxTime = 50000) test-capping.R:167:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-capping.R:151:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 3. Error: maxTime 500 (@test-maxTime.R#35) ─────────────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::time.irace(maxTime = 500) test-maxTime.R:35:2
2. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-maxTime.R:26:2
3. irace:::createExperimentList(...)
5. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 4. Error: parallel reject (@test-sann-irace.R#97) ──────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::sann.irace(...) test-sann-irace.R:97:2
2. irace::irace(scenario = scenario, parameters = parameters) test-sann-irace.R:77:2
3. irace:::race(...)
4. irace:::race.wrapper(...)
5. irace:::createExperimentList(...)
7. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 5. Error: similarConfigurations (@test-similar.R#28) ───────────────────────
invalid argument type
Backtrace:
1. testthat::expect_identical(...) test-similar.R:28:2
4. irace:::similarConfigurations(confs[1:10, ], parameters, threshold = 0.001)
── 6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36) ───────────
invalid subscript type 'list'
Backtrace:
1. irace::irace(scenario = tuner.config, parameters = parameters) test-targetRunnerParallel.R:36:3
2. irace:::race(...)
3. irace:::race.wrapper(...)
4. irace:::createExperimentList(...)
6. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 7. Error: targetRunnerData (@test-targetRunnerParallel.R#54) ───────────────
invalid subscript type 'list'
Backtrace:
1. testthat::expect_output(...) test-targetRunnerParallel.R:54:2
10. irace::irace(...)
11. irace:::race(...)
12. irace:::race.wrapper(...)
13. irace:::createExperimentList(...)
15. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
── 8. Error: target.evaluator (@test-targeteval.R#27) ─────────────────────────
invalid subscript type 'list'
Backtrace:
1. irace:::checkTargetFiles(scenario = scenario, parameters = parameters) test-targeteval.R:27:3
2. irace:::createExperimentList(...)
4. base::`[.data.frame`(configurations, , pnames, drop = FALSE)
══ DONE ════════════════════════════════════════════════════════════════════════
══ testthat results ═══════════════════════════════════════════════════════════
[ OK: 112 | SKIPPED: 9 | WARNINGS: 0 | FAILED: 8 ]
1. Error: cap.irace maxExperiments = 1000 (@test-capping.R#162)
2. Error: cap.irace maxExperiments = 50000 (@test-capping.R#167)
3. Error: maxTime 500 (@test-maxTime.R#35)
4. Error: parallel reject (@test-sann-irace.R#97)
5. Error: similarConfigurations (@test-similar.R#28)
6. Error: targetRunnerParallel (@test-targetRunnerParallel.R#36)
7. Error: targetRunnerData (@test-targetRunnerParallel.R#54)
8. Error: target.evaluator (@test-targeteval.R#27)
Error: testthat unit tests failed
Execution halted
Flavor: r-patched-linux-x86_64
Version: 3.3
Check: examples
Result: ERROR
Running examples in ‘irace-Ex.R’ failed
The error most likely occurred in:
> ### Name: irace-package
> ### Title: The irace package: Iterated Racing for Automatic Algorithm
> ### Configuration
> ### Aliases: irace-package
> ### Keywords: automatic configuration optimize package tuning
>
> ### ** Examples
>
> #######################################################################
> # This example illustrates how to tune the parameters of the simulated
> # annealing algorithm (SANN) provided by the optim() function in the
> # R base package. The goal in this example is to optimize instances of
> # the following family:
> # f(x) = lambda * f_rastrigin(x) + (1 - lambda) * f_rosenbrock(x)
> # where lambda follows a normal distribution whose mean is 0.9 and
> # standard deviation is 0.02. f_rastrigin and f_rosenbrock are the
> # well-known Rastrigin and Rosenbrock benchmark functions (taken from
> # the cmaes package). In this scenario, different instances are given
> # by different values of lambda.
> #######################################################################
> ## First we provide an implementation of the functions to be optimized:
> f_rosenbrock <- function (x) {
+ d <- length(x)
+ z <- x + 1
+ hz <- z[1:(d - 1)]
+ tz <- z[2:d]
+ s <- sum(100 * (hz^2 - tz)^2 + (hz - 1)^2)
+ return(s)
+ }
> f_rastrigin <- function (x) {
+ sum(x * x - 10 * cos(2 * pi * x) + 10)
+ }
>
> ## We generate 200 instances (in this case, weights):
> weights <- rnorm(200, mean = 0.9, sd = 0.02)
>
> ## On this set of instances, we are interested in optimizing two
> ## parameters of the SANN algorithm: tmax and temp. We setup the
> ## parameter space as follows:
> parameters.table <- '
+ tmax "" i (1, 5000)
+ temp "" r (0, 100)
+ '
>
> ## We use the irace function readParameters to read this table:
> parameters <- readParameters(text = parameters.table)
>
> ## Next, we define the function that will evaluate each candidate
> ## configuration on a single instance. For simplicity, we restrict to
> ## three-dimensional functions and we set the maximum number of
> ## iterations of SANN to 5000.
> target.runner <- function(experiment, scenario)
+ {
+ instance <- experiment$instance
+ configuration <- experiment$configuration
+
+ D <- 3
+ par <- runif(D, min=-1, max=1)
+ fn <- function(x) {
+ weight <- instance
+ return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x))
+ }
+ res <- stats::optim(par,fn, method="SANN",
+ control=list(maxit=5000
+ , tmax = as.numeric(configuration[["tmax"]])
+ , temp = as.numeric(configuration[["temp"]])
+ ))
+ ## New output interface in irace 2.0. This list may also contain:
+ ## - 'time' if irace is called with 'maxTime'
+ ## - 'error' is a string used to report an error
+ ## - 'outputRaw' is a string used to report the raw output of calls to
+ ## an external program or function.
+ ## - 'call' is a string used to report how target.runner called the
+ ## external program or function.
+ return(list(cost = res$value))
+ }
>
> ## We define a configuration scenario by setting targetRunner to the
> ## function define above, instances to the first 100 random weights, and
> ## a maximum budget of 1000 calls to targetRunner.
> scenario <- list(targetRunner = target.runner,
+ instances = weights[1:100],
+ maxExperiments = 1000,
+ # Do not create a logFile
+ logFile = "")
>
> ## We check that the scenario is valid. This will also try to execute
> ## target.runner.
> checkIraceScenario(scenario, parameters = parameters)
# 2020-03-26 16:29:48 GMT: Checking scenario
## irace scenario:
scenarioFile = "./scenario.txt"
parameterFile = "/home/ripley/R/packages/tests-devel/irace.Rcheck/parameters.txt"
execDir = "/home/ripley/R/packages/tests-devel/irace.Rcheck"
logFile = NULL
recoveryFile = NULL
instances = c(0.887470923785153, 0.903672866484442, 0.883287427751799, 0.931905616042756, 0.906590155436307, 0.88359063231764, 0.90974858104857, 0.914766494102584, 0.91151562703307, 0.893892232256873, 0.930235623369017, 0.907796864728229, 0.887575188389164, 0.85570600225645, 0.922498618362862, 0.899101327819695, 0.899676194738021, 0.918876724213706, 0.916424423901962, 0.91187802642435, 0.918379547432164, 0.915642726014621, 0.901491299667304, 0.860212966082733, 0.912396514957894, 0.89887742520942, 0.896884089865893, 0.870584952322014, 0.890436998897828, 0.908358831203994, 0.927173591030581, 0.89794424545314, 0.907753432231187, 0.898923899188342, 0.872458808863428, 0.891700108734006, 0.892114200925793, 0.898813732065776, 0.922000507439678, 0.915263514969151, 0.896709528074928, 0.89493276639727, 0.913939267508095, 0.911133263973473, 0.88622488610901, 0.885850096860758, 0.907291639242737, 0.915370658490308, 0.897753075756995, 0.917622154529084, 0.907962117607341, 0.887759472134985, 0.906822393828489, 0.877412738078384, 0.928660474034021, 0.939607997970117, 0.89265557047067, 0.879117307473669, 0.911394392548848, 0.897298907922384, 0.948032355210096, 0.899215199945337, 0.913794787249016, 0.900560043175613, 0.885134535822352, 0.903775845990287, 0.863900827422179, 0.929311097231258, 0.903065066764238, 0.943452233407243, 0.909510190577993, 0.885801071381564, 0.912214527069781, 0.881318047367115, 0.874927331995218, 0.905828924710349, 0.891134162535631, 0.900022107032633, 0.901486826483033, 0.888209581076239, 0.88862662534363, 0.897296427697523, 0.923561739931464, 0.869528663991405, 0.911878923752568, 0.90665900742427, 0.921261996745527, 0.893916321527314, 0.907400376198326, 0.905341975815445, 0.889149599380167, 0.924157356119663, 0.923208052313899, 0.9140042729903, 0.931736669090817, 0.911169728511306, 0.874468155830839, 0.888534691715262, 0.875507747702033, 0.890531987271214)
trainInstancesDir = "./Instances"
trainInstancesFile = ""
configurationsFile = ""
forbiddenExps = NULL
forbiddenFile = ""
targetRunner = function (experiment, scenario) { instance <- experiment$instance configuration <- experiment$configuration D <- 3 par <- runif(D, min = -1, max = 1) fn <- function(x) { weight <- instance return(weight * f_rastrigin(x) + (1 - weight) * f_rosenbrock(x)) } res <- stats::optim(par, fn, method = "SANN", control = list(maxit = 5000, tmax = as.numeric(configuration[["tmax"]]), temp = as.numeric(configuration[["temp"]]))) return(list(cost = res$value))}
targetRunnerRetries = 0
targetRunnerData = ""
targetRunnerParallel = NULL
targetEvaluator = NULL
maxExperiments = 1000
maxTime = 0
budgetEstimation = 0.02
digits = 4
debugLevel = 2
nbIterations = 0
nbExperimentsPerIteration = 0
sampleInstances = TRUE
testType = "friedman"
firstTest = 5
eachTest = 1
minNbSurvival = 0
nbConfigurations = 0
mu = 5
confidence = 0.95
deterministic = FALSE
seed = NA_character_
parallel = 0
loadBalancing = TRUE
mpi = FALSE
batchmode = "0"
softRestart = TRUE
softRestartThreshold = 1e-04
testInstancesDir = ""
testInstancesFile = ""
testInstances = NULL
testNbElites = 1
testIterationElites = FALSE
elitist = TRUE
elitistNewInstances = 1
elitistLimit = 2
repairConfiguration = NULL
capping = FALSE
cappingType = "median"
boundType = "candidate"
boundMax = NULL
boundDigits = 0
boundPar = 1
boundAsTimeout = TRUE
postselection = 0
aclib = FALSE
## end of irace scenario
# Parameters provided by user.
# Parameter file '/home/ripley/R/packages/tests-devel/irace.Rcheck/parameters.txt' will be ignored
# 2020-03-26 16:29:48 GMT: Checking target execution.
Error in .subset(x, j) : invalid subscript type 'list'
Calls: checkIraceScenario ... checkTargetFiles -> createExperimentList -> [ -> [.data.frame
Execution halted
Flavor: r-patched-solaris-x86
Version: 3.3
Check: package dependencies
Result: NOTE
Package suggested but not available for checking: ‘Rmpi’
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64