From 6b9767676d91dc2eddb4c55bbb11c62a5af6ed3e Mon Sep 17 00:00:00 2001 From: be-marc Date: Sat, 29 Jun 2024 14:55:41 +0200 Subject: [PATCH] fix: no visible binding --- NAMESPACE | 1 + R/OptimizerBatchHyperband.R | 2 +- R/zzz.R | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index c4abe9f5..c98e76be 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,3 +16,4 @@ import(mlr3tuning) import(paradox) importFrom(R6,R6Class) importFrom(utils,bibentry) +importFrom(utils,head) diff --git a/R/OptimizerBatchHyperband.R b/R/OptimizerBatchHyperband.R index ec3c39f1..c32377eb 100644 --- a/R/OptimizerBatchHyperband.R +++ b/R/OptimizerBatchHyperband.R @@ -159,7 +159,7 @@ OptimizerBatchHyperband = R6Class("OptimizerBatchHyperband", # promote configurations of previous batch if (s != s_max) { archive = inst$archive - data = archive$data[batch_nr == archive$n_batch, ] + data = archive$data[archive$n_batch, , on = "batch_nr"] minimize = ifelse(archive$codomain$maximization_to_minimization == -1, TRUE, FALSE) # for each bracket, promote configurations of previous stage diff --git a/R/zzz.R b/R/zzz.R index a50cbb07..cee549a6 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -7,6 +7,7 @@ #' @import mlr3tuning #' @import bbotk #' @importFrom R6 R6Class +#' @importFrom utils head "_PACKAGE" register_bbotk = function() {