mlr-org / paradox

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

ParamSet dependencies are not properly deep cloned #271

Closed pfistfl closed 4 years ago

pfistfl commented 4 years ago

I guess the following should work:

  library(paradox)
  ps = ParamSet$new()
  ps$add(ParamFct$new("a", levels = letters[1:3]))
  ps$add(ParamFct$new("b", levels = letters[1:3]))
  ps$add_dep("a", "b", CondAnyOf$new(letters[1:2]))

  ps2 = ps$clone(deep = TRUE)
  expect_deep_clone(ps, ps2)

I get the following error: Error: Object addresses differ at path ROOT->[element .enclos_env] '.enclos_env'->[element private] 'private'->[element .deps] '.deps'->[element cond] 'cond'->[element 1] isn't true.

expect_deep_clone is from here

mb706 commented 4 years ago

Also addressed by #273 now

jakob-r commented 4 years ago

close because #273 is merged