From f0cff4bbfcfb122ef5ef2ec14b2e983e03898304 Mon Sep 17 00:00:00 2001 From: till-m Date: Mon, 12 May 2025 10:21:06 +0200 Subject: [PATCH 1/4] bugfix: l-bfgs-b acq --- bayes_opt/acquisition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bayes_opt/acquisition.py b/bayes_opt/acquisition.py index e17846758..e6b46bd1a 100644 --- a/bayes_opt/acquisition.py +++ b/bayes_opt/acquisition.py @@ -300,7 +300,7 @@ def _l_bfgs_b_minimize( continue # Store it if better than previous minimum(maximum). - if min_acq is None or np.squeeze(res.fun) >= min_acq: + if min_acq is None or np.squeeze(res.fun) <= min_acq: x_min = res.x min_acq = np.squeeze(res.fun) From c8c6c51e1253a5ff0c80934fa0e3aac597b8d4bd Mon Sep 17 00:00:00 2001 From: till-m Date: Mon, 12 May 2025 10:31:46 +0200 Subject: [PATCH 2/4] Update runner --- .github/workflows/build_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 43e7d988e..34ccb2e3d 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -13,7 +13,7 @@ concurrency: jobs: build-docs-and-publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: contents: write steps: From b1190f0d148891e3358294e3dbf2e4bd337236f7 Mon Sep 17 00:00:00 2001 From: till-m Date: Mon, 12 May 2025 10:56:52 +0200 Subject: [PATCH 3/4] Slightly relax equivalency check --- tests/test_constraint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_constraint.py b/tests/test_constraint.py index 495dc9d17..645ad8fe4 100644 --- a/tests/test_constraint.py +++ b/tests/test_constraint.py @@ -89,9 +89,9 @@ def test_single_constraint_lower_upper(target_function, constraint_function): y = res[:, 3] # Check accuracy of approximation for sampled points - assert constraint_function(x, y) == pytest.approx(optimizer.constraint.approx(xy), rel=1e-5, abs=1e-5) + assert constraint_function(x, y) == pytest.approx(optimizer.constraint.approx(xy), rel=1e-4, abs=1e-4) assert constraint_function(x, y) == pytest.approx( - optimizer.space.constraint_values[:-1], rel=1e-5, abs=1e-5 + optimizer.space.constraint_values[:-1], rel=1e-4, abs=1e-4 ) From a9cb130d420affb9578d8df1e83d2c8cd5faef87 Mon Sep 17 00:00:00 2001 From: till-m Date: Mon, 12 May 2025 13:43:18 +0200 Subject: [PATCH 4/4] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e782e08cf..e213df75f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bayesian-optimization" -version = "2.0.3" +version = "2.0.4" description = "Bayesian Optimization package" authors = ["Fernando Nogueira"] license = "MIT"