Skip to content

Commit 3efdb14

Browse files
0.15.21
save_experiment is only executed if it is True in fun_contorl
1 parent 797d7c5 commit 3efdb14

3 files changed

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

src/spotpython/spot/spot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ def run(self, X_start=None) -> Spot:
864864
self.spot_writer.close()
865865
if self.fun_control["db_dict_name"] is not None:
866866
self.write_db_dict()
867-
self.save_experiment()
867+
if self.fun_control["save_experiment"]:
868+
self.save_experiment()
868869
return self
869870

870871
def initialize_design(self, X_start=None) -> None:

src/spotpython/utils/init.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def fun_control_init(
6161
prep_model=None,
6262
prep_model_name=None,
6363
progress_file=None,
64+
save_experiment=False,
6465
scaler=None,
6566
scaler_name=None,
6667
scenario=None,
@@ -198,6 +199,8 @@ def fun_control_init(
198199
The name of the preprocessing model. Default is None.
199200
progress_file (str):
200201
The name of the progress file. Default is None.
202+
save_experiment (bool):
203+
Whether to save the experiment or not. Default is False.
201204
scaler (object):
202205
The scaler object, e.g., the TorchStandard scaler from spot.utils.scaler.py.
203206
Default is None.
@@ -398,6 +401,7 @@ def fun_control_init(
398401
"prep_model": prep_model,
399402
"prep_model_name": prep_model_name,
400403
"progress_file": progress_file,
404+
"save_experiment": save_experiment,
401405
"save_model": False,
402406
"scaler": scaler,
403407
"scaler_name": scaler_name,

0 commit comments

Comments
 (0)