From b97646d06f2b992fb771bf74dbc460fac6415c5b Mon Sep 17 00:00:00 2001 From: phi Date: Sat, 13 Jul 2024 16:22:29 +0900 Subject: [PATCH] fix: _update_params --- bayes_opt/acquisition.py | 7 +------ tests/test_acquisition.py | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/bayes_opt/acquisition.py b/bayes_opt/acquisition.py index d23414648..2bc90bedf 100644 --- a/bayes_opt/acquisition.py +++ b/bayes_opt/acquisition.py @@ -280,8 +280,7 @@ def _l_bfgs_b_minimize( # point technicalities this is not always the case. return np.clip(x_min, bounds[:, 0], bounds[:, 1]), min_acq - @abc.abstractmethod - def _update_params(self) -> None: + def _update_params(self) -> None: # noqa: B027 """Update the parameters of the acquisition function.""" @@ -816,8 +815,6 @@ def suggest( return x_max - def _update_params(self) -> None: ... - class GPHedge(AcquisitionFunction): """GPHedge acquisition function. @@ -933,5 +930,3 @@ def suggest( self.previous_candidates = np.array(x_max) idx = self._sample_idx_from_softmax_gains() return x_max[idx] - - def _update_params(self) -> None: ... diff --git a/tests/test_acquisition.py b/tests/test_acquisition.py index 39b621ab0..9452a8074 100644 --- a/tests/test_acquisition.py +++ b/tests/test_acquisition.py @@ -51,8 +51,6 @@ def mock_acq(x: np.ndarray): def base_acq(self, mean, std): pass - def _update_params(self) -> None: ... - def test_base_acquisition(): acq = acquisition.UpperConfidenceBound()