From d1454c29b293b8b55b40fd0e3dec7c20f560dd24 Mon Sep 17 00:00:00 2001 From: be-marc Date: Thu, 29 Feb 2024 11:44:19 +0100 Subject: [PATCH] fix: data.table --- DESCRIPTION | 2 +- NAMESPACE | 3 +++ R/OptimizerIrace.R | 2 +- man/Codomain.Rd | 9 +-------- man/Terminator.Rd | 4 ++-- man/mlr_terminators.Rd | 4 ++-- man/mlr_terminators_clock_time.Rd | 4 ++-- man/mlr_terminators_combo.Rd | 4 ++-- man/mlr_terminators_evals.Rd | 4 ++-- man/mlr_terminators_none.Rd | 4 ++-- man/mlr_terminators_perf_reached.Rd | 4 ++-- man/mlr_terminators_run_time.Rd | 4 ++-- man/mlr_terminators_stagnation.Rd | 4 ++-- man/mlr_terminators_stagnation_batch.Rd | 4 ++-- 14 files changed, 26 insertions(+), 30 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a479c832d..7258a4ac9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,7 +44,7 @@ Depends: R (>= 3.1.0) Imports: checkmate (>= 2.0.0), - data.table, + data.table (>= 1.15.2), lgr, methods, mlr3misc (>= 0.11.0), diff --git a/NAMESPACE b/NAMESPACE index ebfc18f3b..93177b1c2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -66,6 +66,9 @@ import(mlr3misc) import(paradox) importFrom(R6,R6Class) importFrom(methods,formalArgs) +importFrom(mlr3misc,clbk) +importFrom(mlr3misc,clbks) +importFrom(mlr3misc,mlr_callbacks) importFrom(utils,bibentry) importFrom(utils,capture.output) importFrom(utils,head) diff --git a/R/OptimizerIrace.R b/R/OptimizerIrace.R index 3bd4daead..615fea50c 100644 --- a/R/OptimizerIrace.R +++ b/R/OptimizerIrace.R @@ -229,7 +229,7 @@ target_runner_default = function(experiment, exec.target.runner, scenario, targe configuration }) # fix logicals - lgl_params = as.data.table(optim_instance$search_space)[class == "ParamLgl", id] + lgl_params = as.data.table(optim_instance$search_space)[class == "ParamLgl", id, env = list(id = "id")] if (length(lgl_params)) xdt[, (lgl_params) := lapply(.SD, as.logical), .SDcols = lgl_params] # provide experiment instances to objective diff --git a/man/Codomain.Rd b/man/Codomain.Rd index ee7fe0d35..7af21514d 100644 --- a/man/Codomain.Rd +++ b/man/Codomain.Rd @@ -72,28 +72,21 @@ of a maximization problem to turn it into a minimization problem.} \if{html}{\out{
Inherited methods
}} diff --git a/man/Terminator.Rd b/man/Terminator.Rd index a88824147..b2811d348 100644 --- a/man/Terminator.Rd +++ b/man/Terminator.Rd @@ -26,15 +26,15 @@ The method must return the maximum number of steps (\code{max_steps}) and the cu \seealso{ Other Terminator: +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Public fields}{ diff --git a/man/mlr_terminators.Rd b/man/mlr_terminators.Rd index b721f3800..b15f621f0 100644 --- a/man/mlr_terminators.Rd +++ b/man/mlr_terminators.Rd @@ -46,8 +46,8 @@ Other Terminator: \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, -\code{\link{mlr_terminators_stagnation}} +\code{\link{mlr_terminators_stagnation}}, +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \keyword{datasets} diff --git a/man/mlr_terminators_clock_time.Rd b/man/mlr_terminators_clock_time.Rd index 0909dd351..4735dc6e3 100644 --- a/man/mlr_terminators_clock_time.Rd +++ b/man/mlr_terminators_clock_time.Rd @@ -33,14 +33,14 @@ trm("clock_time", stop_time = stop_time) \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_combo.Rd b/man/mlr_terminators_combo.Rd index cd30a9d17..60c99d414 100644 --- a/man/mlr_terminators_combo.Rd +++ b/man/mlr_terminators_combo.Rd @@ -37,14 +37,14 @@ trm("combo", \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_evals.Rd b/man/mlr_terminators_evals.Rd index 111c747fb..d9fa6d106 100644 --- a/man/mlr_terminators_evals.Rd +++ b/man/mlr_terminators_evals.Rd @@ -52,14 +52,14 @@ trm("evals", n_evals = 1, k = 3) \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_none.Rd b/man/mlr_terminators_none.Rd index 95bfc677d..a53237fef 100644 --- a/man/mlr_terminators_none.Rd +++ b/man/mlr_terminators_none.Rd @@ -21,14 +21,14 @@ trm("none") \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_perf_reached.Rd b/man/mlr_terminators_perf_reached.Rd index d775c7338..8db1c209b 100644 --- a/man/mlr_terminators_perf_reached.Rd +++ b/man/mlr_terminators_perf_reached.Rd @@ -35,14 +35,14 @@ trm("perf_reached") \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_run_time.Rd b/man/mlr_terminators_run_time.Rd index 4bd2e4aaa..ade5355c4 100644 --- a/man/mlr_terminators_run_time.Rd +++ b/man/mlr_terminators_run_time.Rd @@ -36,14 +36,14 @@ trm("run_time", secs = 1800) \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, -\code{\link{mlr_terminators_stagnation_batch}}, \code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_stagnation.Rd b/man/mlr_terminators_stagnation.Rd index 332cf66e3..3e7633905 100644 --- a/man/mlr_terminators_stagnation.Rd +++ b/man/mlr_terminators_stagnation.Rd @@ -38,14 +38,14 @@ trm("stagnation", iters = 5, threshold = 1e-5) \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation_batch}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation_batch}} } \concept{Terminator} \section{Super class}{ diff --git a/man/mlr_terminators_stagnation_batch.Rd b/man/mlr_terminators_stagnation_batch.Rd index de6d0a680..456e3e0df 100644 --- a/man/mlr_terminators_stagnation_batch.Rd +++ b/man/mlr_terminators_stagnation_batch.Rd @@ -38,14 +38,14 @@ trm("stagnation_batch", n = 1, threshold = 1e-5) \seealso{ Other Terminator: \code{\link{Terminator}}, +\code{\link{mlr_terminators}}, \code{\link{mlr_terminators_clock_time}}, \code{\link{mlr_terminators_combo}}, \code{\link{mlr_terminators_evals}}, \code{\link{mlr_terminators_none}}, \code{\link{mlr_terminators_perf_reached}}, \code{\link{mlr_terminators_run_time}}, -\code{\link{mlr_terminators_stagnation}}, -\code{\link{mlr_terminators}} +\code{\link{mlr_terminators_stagnation}} } \concept{Terminator} \section{Super class}{