Skip to content

Commit 8e5c89f

Browse files
authored
Merge pull request #364 from till-m/constraints-logging
Fix JSONLogger with constraints
2 parents a3021cc + 67a7a49 commit 8e5c89f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bayes_opt/logger.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ def update(self, event, instance):
128128
"delta": time_delta,
129129
}
130130

131+
if "allowed" in data: # fix: github.com/fmfn/BayesianOptimization/issues/361
132+
data["allowed"] = bool(data["allowed"])
133+
131134
with open(self._path, "a") as f:
132135
f.write(json.dumps(data) + "\n")
133136

0 commit comments

Comments
 (0)