Skip to content

Commit 8f2eec4

Browse files
0.15.22
save_experiment: copy updated
1 parent 3efdb14 commit 8f2eec4

2 files changed

Lines changed: 5 additions & 4 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.15.21"
10+
version = "0.15.22"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotpython/spot/spot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,9 +2313,10 @@ def save_experiment(self, filename=None) -> None:
23132313
try:
23142314
spot_tuner = copy.deepcopy(self)
23152315
except Exception as e:
2316-
logger.warning("Warning: Could not copy/save spot_tuner object!")
2316+
print("Warning: Could not copy spot_tuner object!")
2317+
logger.warning("Warning: Could not copy spot_tuner object!")
23172318
logger.warning(f"Error: {e}")
2318-
spot_tuner = copy(self)
2319+
spot_tuner = self
23192320
experiment = {
23202321
"design_control": design_control,
23212322
"fun_control": fun_control,
@@ -2342,8 +2343,8 @@ def save_experiment(self, filename=None) -> None:
23422343
pprint.pprint(surrogate_control)
23432344
print("spot_tuner:")
23442345
pprint.pprint(spot_tuner)
2345-
23462346
raise e
2347+
print(f"Experiment saved to {filename}")
23472348

23482349
def init_spot_writer(self) -> None:
23492350
"""

0 commit comments

Comments
 (0)