Skip to content

Commit 19470e4

Browse files
committed
Removed not yet fully implemented bayesian optimization references, made tests work
1 parent 8ddce18 commit 19470e4

10 files changed

+6
-2391
lines changed

kernel_tuner/interface.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@
5050
from kernel_tuner.strategies import (
5151
basinhopping,
5252
bayes_opt,
53-
bayes_opt_alt_BOTorch,
54-
bayes_opt_BOTorch,
55-
bayes_opt_GPyTorch,
56-
bayes_opt_GPyTorch_lean,
57-
bayes_opt_old,
5853
brute_force,
5954
diff_evo,
6055
dual_annealing,
@@ -85,12 +80,7 @@
8580
"pso": pso,
8681
"simulated_annealing": simulated_annealing,
8782
"firefly_algorithm": firefly_algorithm,
88-
"bayes_opt": bayes_opt,
89-
"bayes_opt_old": bayes_opt_old,
90-
"bayes_opt_GPyTorch": bayes_opt_GPyTorch,
91-
"bayes_opt_GPyTorch_lean": bayes_opt_GPyTorch_lean,
92-
"bayes_opt_BOTorch": bayes_opt_BOTorch,
93-
"bayes_opt_BOTorch_alt": bayes_opt_alt_BOTorch,
83+
"bayes_opt": bayes_opt
9484
}
9585

9686

kernel_tuner/strategies/bayes_opt.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def get_hyperparam(name: str, default, supported_values=list()):
238238
self.invalid_value = 1e20
239239
self.opt_direction = opt_direction
240240
if opt_direction == "min":
241-
self.worst_value = np.PINF
241+
self.worst_value = np.inf
242242
self.argopt = np.argmin
243243
elif opt_direction == "max":
244244
self.worst_value = np.NINF
@@ -265,7 +265,7 @@ def get_hyperparam(name: str, default, supported_values=list()):
265265
self.__visited_num = 0
266266
self.__visited_valid_num = 0
267267
self.__visited_searchspace_indices = [False] * self.searchspace_size
268-
self.__observations = [np.NaN] * self.searchspace_size
268+
self.__observations = [np.nan] * self.searchspace_size
269269
self.__valid_observation_indices = [False] * self.searchspace_size
270270
self.__valid_params = list()
271271
self.__valid_observations = list()
@@ -314,7 +314,7 @@ def is_not_visited(self, index: int) -> bool:
314314

315315
def is_valid(self, observation: float) -> bool:
316316
"""Returns whether an observation is valid."""
317-
return not (observation is None or observation == self.invalid_value or observation == np.NaN)
317+
return not (observation is None or observation == self.invalid_value or observation == np.nan)
318318

319319
def get_af_by_name(self, name: str):
320320
"""Get the basic acquisition functions by their name."""

kernel_tuner/strategies/bayes_opt_BOTorch.py

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)