Skip to content

Commit b86aa72

Browse files
0.14.60
extended error message for save_experiment
1 parent d731523 commit b86aa72

2 files changed

Lines changed: 16 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.14.59"
10+
version = "0.14.60"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotPython/spot/spot.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,4 +2117,18 @@ def save_experiment(self, filename=None) -> None:
21172117
filename = get_experiment_filename(PREFIX)
21182118
if filename is not None:
21192119
with open(filename, "wb") as handle:
2120-
pickle.dump(experiment, handle, protocol=pickle.HIGHEST_PROTOCOL)
2120+
try:
2121+
pickle.dump(experiment, handle, protocol=pickle.HIGHEST_PROTOCOL)
2122+
except Exception as e:
2123+
logger.error(f"Error: {e}")
2124+
pprint.pprint(fun_control)
2125+
print("design_control:")
2126+
pprint.pprint(design_control)
2127+
print("optimizer_control:")
2128+
pprint.pprint(optimizer_control)
2129+
print("surrogate_control:")
2130+
pprint.pprint(surrogate_control)
2131+
print("spot_tuner:")
2132+
pprint.pprint(spot_tuner)
2133+
2134+
raise e

0 commit comments

Comments
 (0)