Closed MalteKurz closed 2 years ago
Tuning with default tune_settings fails (even after fixing #155). If tune_settings$measure is set to NULL according to the docu (https://docs.doubleml.org/r/stable/reference/DoubleML.html#method-tune) default measures should be used.
tune_settings
tune_settings$measure
NULL
library(DoubleML) library(mlr3) library(mlr3learners) library(data.table) set.seed(2) ml_g = lrn("regr.ranger", num.trees = 10, max.depth = 2) ml_m = ml_g$clone() obj_dml_data = make_plr_CCDDHNR2018(alpha = 0.5) dml_plr_obj = DoubleMLPLR$new(obj_dml_data, ml_g, ml_m) par_grids = list("ml_g" = paradox::ParamSet$new(list( paradox::ParamInt$new("num.trees", lower = 5, upper = 6, default = 5))), "ml_m" = paradox::ParamSet$new(list( paradox::ParamInt$new("num.trees", lower = 5, upper = 6, default = 5)))) tune_settings = list( n_folds_tune = 5, rsmp_tune = mlr3::rsmp("cv", folds = 5), measure = NULL, terminator = mlr3tuning::trm("evals", n_evals = 20), algorithm = mlr3tuning::tnr("grid_search"), resolution = 5) dml_plr_obj$tune(param_set=par_grids, tune_settings = tune_settings)
No exception
Exception
Error in private$assert_tune_settings(tune_settings) : Assertion on 'tune_settings$measure' failed: Must be of type 'list', not 'NULL'.
> sessionInfo() R version 4.0.4 (2021-02-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 21.10 > packageVersion('DoubleML') [1] ‘0.4.1’ > packageVersion('mlr3') [1] ‘0.11.0.9000’
Describe the bug
Tuning with default
tune_settings
fails (even after fixing #155). Iftune_settings$measure
is set toNULL
according to the docu (https://docs.doubleml.org/r/stable/reference/DoubleML.html#method-tune) default measures should be used.Minimum reproducible code snippet
Expected Result
No exception
Actual Result
Exception
Versions