mlr-org / paradox

ParamHelpers Next Generation
https://paradox.mlr-org.com
GNU Lesser General Public License v3.0
28 stars 7 forks source link

Constructing list of `to_tune` objects from `ParamSet` [Question] #379

Closed bblodfon closed 1 year ago

bblodfon commented 1 year ago

Hi!

Is it possible to convert this ParamSet automatically to the list below?

my_ps = ps(
    lambda = p_dbl(1e-03, 10, logscale = TRUE),
    alpha  = p_dbl(0, 1))

list(lambda = to_tune(p_dbl(1e-03, 10, logscale = TRUE)),
    alpha  = to_tune(p_dbl(0, 1)))
sebffischer commented 1 year ago

This is currently not easily possible. The convenience mechanism with ps(...) etc. can be used to create ParamSets more easily but not really the other way around.

bblodfon commented 1 year ago

Thanks Sebastian, I though so, just asked to make sure!