@@ -60,15 +60,18 @@ ResultAssignerSurrogate = R6Class("ResultAssignerSurrogate",
6060 archive_tmp = archive $ clone(deep = TRUE )
6161 archive_tmp $ data [, self $ surrogate $ cols_y : = means ]
6262 xydt = archive_tmp $ best()
63- best = xydt [, archive_tmp $ cols_x , with = FALSE ]
63+ cols_x = archive_tmp $ cols_x
64+ cols_y = archive_tmp $ cols_y
65+ best = xydt [, cols_x , with = FALSE ]
66+ extra = xydt [, ! c(cols_x , cols_y ), with = FALSE ]
6467
6568 # ys are still the ones originally evaluated
6669 best_y = if (inherits(instance , c(" OptimInstanceBatchSingleCrit" , " OptimInstanceAsyncSingleCrit" ))) {
67- unlist(archive $ data [best , on = archive $ cols_x ][, archive $ cols_y , with = FALSE ])
70+ unlist(archive $ data [best , on = cols_x ][, cols_y , with = FALSE ])
6871 } else if (inherits(instance , c(" OptimInstanceBatchMultiCrit" , " OptimInstanceAsyncMultiCrit" ))) {
69- archive $ data [best , on = archive $ cols_x ][, archive $ cols_y , with = FALSE ]
72+ archive $ data [best , on = cols_x ][, cols_y , with = FALSE ]
7073 }
71- instance $ assign_result(xdt = best , best_y , xydt = xydt )
74+ instance $ assign_result(xdt = best , y = best_y , extra = extra )
7275 }
7376 ),
7477
0 commit comments