1

i have error message when I run code from mlr Manual.

library(mlr3)

task = mlr_tasks$get("iris")
learner = mlr_learners$get("classif.rpart")
resampling = mlr_resamplings$get("holdout")
measures = mlr_measures$mget("classif.ce")
param_set = paradox::ParamSet$new(
  params = list(paradox::ParamDbl$new("cp", lower = 0.001, upper = 0.1)))
terminator = mlr3tuning::TerminatorEvaluations$new(5)

at = mlr3tuning::AutoTuner$new(learner, resampling, measures = measures, param_set, terminator,
                               tuner = mlr3tuning::TunerGridSearch)

Output message: Error in self$data$tuner_generator = tuner : cannot add bindings to a locked environment

Is this problem with my local setting or just issue in mlr3tuning?


My setup: Microsoft R Open 3.5.3 The enhanced R distribution from Microsoft Microsoft packages Copyright (C) 2019 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing (using 6 cores).

R version 3.5.3 (2019-03-11) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 18362)

1 Answers1

2

mlr3 is still very new and in active development, so from time to time things will break like this. Should be fixed soon.

To be clear, this isn't an issue with your local settings.

Update: The start page of the book now displays the versions of the mlr3 packages that it was successfully built with. If something breaks, copy and paste the command at the bottom of the page to install the package versions that work.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
  • I tried to install these versions, but I have the same error message – Paweł Kasperkiewicz Aug 06 '19 at 15:49
  • I installed packages from bottom of the page using remotes (I changed order of mlr3 and mlr3misc because I have problem during installation and it solve it): remotes::install_github(c('mlr-org/mlr3misc@49a04a5', 'mlr-org/mlr3@73a3a54', 'mlr-org/mlr3tuning@7f08e05', 'mlr-org/paradox@4c1f5cb'), force = TRUE) Then I load packages and excute code from manual book. This gives me error: Error in self$data$tuner_generator = tuner : cannot add bindings to a locked environment – Paweł Kasperkiewicz Aug 06 '19 at 16:14
  • Sorry, this is still broken and not run in the book code for now -- we only added recording the package versions in response to this issue, so we don't have the versions for builds before then. There's an issue for this though: https://github.com/mlr-org/mlr3tuning/issues/104 – Lars Kotthoff Aug 06 '19 at 16:25
  • Ok, so I will be waiting for update. Thank's for help – Paweł Kasperkiewicz Aug 06 '19 at 16:32