Closed sumny closed 3 years ago
Seems like deep cloning of archives does not fully work:
archive
library(bbotk) library(paradox) library(data.table) search_space = domain = ps(x = p_dbl(lower = -1, upper = 1)) codomain = ps(y = p_dbl(tags = "minimize")) objective_function = function(xs) { list(y = as.numeric(xs)^2) } objective = ObjectiveRFun$new( fun = objective_function, domain = domain, codomain = codomain) instance = OptimInstanceSingleCrit$new( objective = objective, search_space = search_space, terminator = trm("evals", n_evals = 10) ) optimizer = opt("random_search") optimizer$optimize(instance) archive1 = instance$archive archive2 = instance$archive$clone(deep = TRUE) address(archive1) != address(archive2) address(archive1$data) != address(archive2$data) archive1$data[, x := 0] archive1 archive2
Thanks! Fixed by 3aa2e29ba4efbc5bd2c800b872b3fc45c8f5feae
Seems like deep cloning of
archive
s does not fully work: