Skip to content

Commit cc4a26e

Browse files
authored
bugfix: l-bfgs-b acquisition maximization (#563)
* bugfix: l-bfgs-b acq * Update runner * Slightly relax equivalency check * bump version
1 parent e487e5f commit cc4a26e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/build_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313

1414
jobs:
1515
build-docs-and-publish:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-latest
1717
permissions:
1818
contents: write
1919
steps:

bayes_opt/acquisition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def _l_bfgs_b_minimize(
300300
continue
301301

302302
# Store it if better than previous minimum(maximum).
303-
if min_acq is None or np.squeeze(res.fun) >= min_acq:
303+
if min_acq is None or np.squeeze(res.fun) <= min_acq:
304304
x_min = res.x
305305
min_acq = np.squeeze(res.fun)
306306

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "bayesian-optimization"
3-
version = "2.0.3"
3+
version = "2.0.4"
44
description = "Bayesian Optimization package"
55
authors = ["Fernando Nogueira"]
66
license = "MIT"

tests/test_constraint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ def test_single_constraint_lower_upper(target_function, constraint_function):
8989
y = res[:, 3]
9090

9191
# Check accuracy of approximation for sampled points
92-
assert constraint_function(x, y) == pytest.approx(optimizer.constraint.approx(xy), rel=1e-5, abs=1e-5)
92+
assert constraint_function(x, y) == pytest.approx(optimizer.constraint.approx(xy), rel=1e-4, abs=1e-4)
9393
assert constraint_function(x, y) == pytest.approx(
94-
optimizer.space.constraint_values[:-1], rel=1e-5, abs=1e-5
94+
optimizer.space.constraint_values[:-1], rel=1e-4, abs=1e-4
9595
)
9696

9797

0 commit comments

Comments
 (0)