Skip to content

Commit e11434f

Browse files
0.10.9
optimizer selection behavior modifier in spot
1 parent 29bdc2e commit e11434f

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotPython"
10-
version = "0.10.8"
10+
version = "0.10.9"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotPython/spot/spot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,10 @@ def __init__(
284284
self.surrogate_control.update({"noise": self.fun_control.noise})
285285
if self.surrogate_control["model_fun_evals"] is None:
286286
self.surrogate_control.update({"model_fun_evals": self.optimizer_control["max_iter"]})
287-
if self.surrogate_control["model_optimizer"] is None:
287+
# self.optimizer is not None here. If 1) the key "model_optimizer"
288+
# is still None or 2) a user specified optimizer is provided, update the value of
289+
# the key "model_optimizer" to the value of self.optimizer.
290+
if self.surrogate_control["model_optimizer"] is None or optimizer is not None:
288291
self.surrogate_control.update({"model_optimizer": self.optimizer})
289292

290293
# If self.surrogate_control["n_theta"] > 1, use k theta values:

0 commit comments

Comments
 (0)