Spaces:
Runtime error
Runtime error
gchhablani
commited on
Commit
•
b1f5f2e
1
Parent(s):
f4a642d
Add except info in killing TensorBoard
Browse files
apps/streamlit_tensorboard.py
CHANGED
@@ -11,7 +11,6 @@ import os, signal
|
|
11 |
|
12 |
def kill_tensorboard():
|
13 |
try:
|
14 |
-
|
15 |
# iterating through each instance of the process
|
16 |
for line in os.popen("ps ax | grep " + "tensorboard" + " | grep -v grep"):
|
17 |
fields = line.split()
|
@@ -22,7 +21,7 @@ def kill_tensorboard():
|
|
22 |
# terminating process
|
23 |
os.kill(int(pid), signal.SIGKILL)
|
24 |
except:
|
25 |
-
|
26 |
|
27 |
def st_tensorboard(logdir="/logs/", port=6006, width=None, height=800, scrolling=True):
|
28 |
"""Embed Tensorboard within a Streamlit app
|
@@ -68,8 +67,8 @@ def st_tensorboard(logdir="/logs/", port=6006, width=None, height=800, scrolling
|
|
68 |
</script>
|
69 |
"""
|
70 |
|
71 |
-
args_string = f"--logdir {logdir} --port {port}"
|
72 |
-
|
73 |
parsed_args = shlex.split(args_string, comments=True, posix=True)
|
74 |
start_result = manager.start(parsed_args)
|
75 |
|
|
|
11 |
|
12 |
def kill_tensorboard():
|
13 |
try:
|
|
|
14 |
# iterating through each instance of the process
|
15 |
for line in os.popen("ps ax | grep " + "tensorboard" + " | grep -v grep"):
|
16 |
fields = line.split()
|
|
|
21 |
# terminating process
|
22 |
os.kill(int(pid), signal.SIGKILL)
|
23 |
except:
|
24 |
+
st.info("Error Encountered while running kill script")
|
25 |
|
26 |
def st_tensorboard(logdir="/logs/", port=6006, width=None, height=800, scrolling=True):
|
27 |
"""Embed Tensorboard within a Streamlit app
|
|
|
67 |
</script>
|
68 |
"""
|
69 |
|
70 |
+
#args_string = f"--logdir {logdir} --port {port}"
|
71 |
+
args_string = f"--logdir {logdir} --host localhost"
|
72 |
parsed_args = shlex.split(args_string, comments=True, posix=True)
|
73 |
start_result = manager.start(parsed_args)
|
74 |
|