Skip to content

Commit 95f1251

Browse files
committed
Update acquisition.py
1 parent 380fe64 commit 95f1251

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bayes_opt/acquisition.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def _l_bfgs_b_minimize(
309309
x_try: NDArray[Float]
310310
x_min: NDArray[Float]
311311

312-
#Case of continous optimization
312+
# Case of continous optimization
313313
if all(continuous_dimensions):
314314
for x_try in x_seeds:
315315
res: OptimizeResult = minimize(acq, x_try, bounds=continuous_bounds, method="L-BFGS-B")
@@ -322,14 +322,14 @@ def _l_bfgs_b_minimize(
322322
x_min = x_try
323323
min_acq = np.squeeze(res.fun)
324324

325-
#Case of mixed-integer optimization
325+
# Case of mixed-integer optimization
326326
else:
327-
ntrials = max(1, len(x_seeds)//100)
327+
ntrials = max(1, len(x_seeds) // 100)
328328
for i in range(ntrials):
329-
xinit = space.random_sample(15*len(space.bounds), random_state=i)
330-
res: OptimizeResult = differential_evolution(acq, bounds=bounds, init=xinit,
331-
integrality=discrete_dimensions,
332-
seed=self.random_state)
329+
xinit = space.random_sample(15 * len(space.bounds), random_state=i)
330+
res: OptimizeResult = differential_evolution(
331+
acq, bounds=bounds, init=xinit, integrality=discrete_dimensions, seed=self.random_state
332+
)
333333
# See if success
334334
if not res.success:
335335
continue

0 commit comments

Comments
 (0)