File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77
88[project ]
99name = " spotPython"
10- version = " 0.6.21 "
10+ version = " 0.6.22 "
1111authors = [
1212 { name =" T. Bartz-Beielstein" , email =" tbb@bartzundbartz.de" }
1313]
Original file line number Diff line number Diff line change 1+ import subprocess
2+
3+
4+ def start_tensorboard () -> subprocess .Popen :
5+ """Starts a tensorboard server in the background.
6+
7+ Returns:
8+ process: The process of the tensorboard server.
9+
10+ Examples:
11+ >>> process = start_tensorboard()
12+
13+ """
14+ cmd = ["tensorboard" , "--logdir=./runs" ]
15+ process = subprocess .Popen (cmd )
16+ return process
17+
18+
19+ def stop_tensorboard (process ) -> None :
20+ """Stops a tensorboard server.
21+
22+ Args:
23+ process: The process of the tensorboard server.
24+
25+ Returns:
26+ None
27+
28+ Examples:
29+ >>> process = start_tensorboard()
30+ >>> stop_tensorboard(process)
31+ """
32+ process .terminate ()
You can’t perform that action at this time.
0 commit comments