Skip to content

Commit 0b39d3f

Browse files
authored
Merge pull request #345 from yahoo/leewyang_tb_path
Add sys.path to TensorBoard search path
2 parents 8e95951 + 775be96 commit 0b39d3f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
py4j
2-
pyspark
2+
pyspark==2.3.1
33
sphinx
44
tensorflow

tensorflowonspark/TFSparkNode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ def _mapfn(iter):
207207
# search for tensorboard in python/bin, PATH, and PYTHONPATH
208208
pypath = sys.executable
209209
pydir = os.path.dirname(pypath)
210-
search_path = os.pathsep.join([pydir, os.environ['PATH'], os.environ['PYTHONPATH']])
210+
sys_path = os.pathsep.join(sys.path)
211+
search_path = os.pathsep.join([pydir, sys_path, os.environ['PATH'], os.environ['PYTHONPATH']])
212+
211213
tb_path = util.find_in_path(search_path, 'tensorboard') # executable in PATH
212214
if not tb_path:
213215
tb_path = util.find_in_path(search_path, 'tensorboard/main.py') # TF 1.3+

0 commit comments

Comments
 (0)