Skip to content

Commit 3d3c072

Browse files
0.14.65
tb clean
1 parent ae7bdd0 commit 3d3c072

3 files changed

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

src/spotPython/utils/file.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import pprint
1010
from spotPython.utils.eda import gen_design_table
1111
from spotPython.utils.tensorboard import start_tensorboard, stop_tensorboard
12+
from spotPython.utils.init import setup_paths
1213

1314

1415
# from torch.utils.tensorboard import SummaryWriter
@@ -244,7 +245,11 @@ def load_and_run_spot_python_experiment(spot_pkl_name) -> tuple:
244245
print("\nLoaded fun_control in spotRun():")
245246
pprint.pprint(fun_control)
246247
print(gen_design_table(fun_control))
247-
p_open = start_tensorboard()
248+
setup_paths(fun_control["TENSORBOARD_CLEAN"])
249+
if fun_control["tensorboard_start"]:
250+
p_open = start_tensorboard()
251+
else:
252+
p_open = None
248253
spot_tuner.run()
249254
spot_tuner.save_experiment()
250255
# tensorboard --logdir="runs/"

src/spotPython/utils/init.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,11 @@ def setup_paths(tensorboard_clean) -> tuple:
469469
TENSORBOARD_PATH (str):
470470
The path to the folder where the tensorboard files are saved.
471471
472+
Examples:
473+
>>> from spotPython.utils.init import setup_paths
474+
>>> setup_paths(tensorboard_clean=True)
475+
('runs/saved_models/', 'data/', 'results/', 'runs/')
476+
472477
"""
473478
# Path to the folder where the pretrained models are saved
474479
CHECKPOINT_PATH = os.environ.get("PATH_CHECKPOINT", "runs/saved_models/")

0 commit comments

Comments
 (0)