Changes to "paradox" package will break NADIA
We are in the process of overhauling the paradox package, on which your NADIA package depends: At some point in the near future, we are going to merge this PR.
This will remove the ParamDbl, ParamInt etc. classes, instead only the ParamSet class will remain, representing the parameter space as a table. Constructing a ParamSet will then need to be done using the shorthand forms ps(), p_dbl(), p_int() etc. See this diff of PipeOpImputeOOR.R in mlr3pipelines as an example of what changes are necessary.
Note that ps(), p_dbl() etc. is already possible (and the recommended way of doing this!), we are just phasing out the old ParamDbl$new() way.
If it helps, I did this semi-automatically by running the following in the R directory of affected packages. Please check these commands before running them and check the result, I can't guarantee that it works as intended in your setup.
sed -i 's/\(^ *\)ParamInt\$new("\([^"]*\)", /\1\2 = p_int(/' ./*.R
sed -i 's/\(^ *\)ParamDbl\$new("\([^"]*\)", /\1\2 = p_dbl(/' ./*.R
sed -i 's/\(^ *\)ParamFct\$new("\([^"]*\)", /\1\2 = p_fct(/' ./*.R
sed -i 's/\(^ *\)ParamUty\$new("\([^"]*\)", /\1\2 = p_uty(/' ./*.R
sed -i 's/\(^ *\)ParamLgl\$new("\([^"]*\)", /\1\2 = p_lgl(/' ./*.R
sed -i 's/ParamSet\$new()/ps()/g' ./*.R
sed -i 's/ParamSet\$new(list/ParamSet$new(params = list/g' ./*.R
for f in ./*.R ; do awk '/ParamSet\$new\(params = list\($/ { sub(/ParamSet\$new\(params = list\(/, "ps("); print; in_block=1; next; } in_block && /^ *\)\)$/ { sub(/\)\)/, ")"); in_block=0; } { print }' $f > tmp ; mv tmp $f ; done
It is not perfect -- it e.g. fails when the closing parentheses of the ParamSet$new(params = list( are not on the same line (i.e. they are not ))), so I had to do some manual cleaning afterwards.
Some other changes could also be necessary: Instead of accessing param_set$params[["<id>"]]$<field>, it is now necessary to access param_set$<field>[["<id>"]]. Both of these were possible in the past, we are phasing out the first one now.
Please @ me if you have any questions, I will try to help.
Hello! I'm encountering an issue when trying to use PipeOpMice from the NADIA package. When running the following example code, I receive an error.
library(NADIA) library(mlr3oml) task <- mlr3oml::OMLTask$new(55) task <- task$task graph <- PipeOpMice$new()%>>% PipeOpEncodeImpact$new() %>>% lrn('classif.glmnet') Error in isTRUE(lhs) : 找不到对象'ParamDbl'
Thank you for any assistance you can provide! The error seems related to the ParamDbl object, but I'm not sure if there's a specific configuration or setup required to resolve this. Any suggestions would be greatly appreciated.
Sorry, it appears NADIA never added the adjustments to work with the new paradox package. If you still need it, you will need to install old versions of paradox, mlr3, mlr3pipelines etc. for now. (I am the maintainer of paradox and mlr3pipelines, but not involved with NADIA)