Tensorboard Cannot Find .runfiles Directory Error

I installed the tensogram through pip, and when I try to execute tensorboard --logdir= Graph/, I get the following error

Traceback (most recent call last):
  File "/home/pawan/.local/bin/tensorboard", line 152, in <module>
    Main()
  File "/home/pawan/.local/bin/tensorboard", line 102, in Main
    module_space = FindModuleSpace()
  File "/home/pawan/.local/bin/tensorboard", line 83, in FindModuleSpace
    sys.argv[0])
    AssertionError: Cannot find .runfiles directory for /home/pawan/.local/bin/tensorboard

I do which tensorboardand get the following

/home/pawan/.local/bin/tensorboard

Thanks in advance.

+4
source share
2 answers

They did not seem to think that anyone would install Penson TensorBoard in the user's directory. Below is my hack to make it work:

The ~/.local/bin/tensorboardscript has a section that looks like this:

def FindModuleSpace():
  # Follow symlinks, looking for my module space
  stub_filename = os.path.abspath(sys.argv[0])
  while True:
    # Found it?
    module_space = stub_filename + '.runfiles'
    if os.path.isdir(module_space):
      break
    for mod in site.getsitepackages():
      module_space = mod + '/tensorboard/tensorboard' + '.runfiles'
      if os.path.isdir(module_space):
        return module_space

(just above the statement with the error "Cannot find the .runfiles directory").

In the directory he is looking for

~/.local/lib/python2.7/site-packages/tensorboard/tensorboard.runfiles

, find ~/.local -name '*runfiles*'.

for , :

    for mod in site.getsitepackages() + [os.path.expanduser("~/.local/lib/python2.7/site-packages")]

, :

  • python2.7, Python. .
  • Windows ; os.path.join .
  • TensorBoard. ?
+7

.

tensorflow ( tenorflow ~/):

cd ~/tensorflow/lib/python2.7/site-packages/tensorboard

:

python tensorboard --logdir=(the location of your logs path)
+1

Source: https://habr.com/ru/post/1671469/


All Articles