3

Every time I try to run tensorboard using command:

tensorboard --logdir=logs/ --host=127.0.0.1 in command prompt after navigating to logs directory I get this error: OSError: [Errno 22] Invalid argument. I am using TensorBoard version 1.13.1 I have used the following command in my code:

tensorboard = TensorBoard(log_dir='<My/Path/To/Tensorflow/Log/Directory>')

and called it using:

`clf.fit(X,y,batch_size=30,
          epochs=15,
          validation_split=0.4,
          callbacks=[tensorboard]
       )`
sanyassh
  • 8,100
  • 13
  • 36
  • 70
Neetu Vikram
  • 61
  • 2
  • 5

4 Answers4

6

Encountered this problem with Python 3.7.0 too.

Invalid Arguments

Following solution worked.

Go to <Home_DIR>\Anaconda3\lib\site-packages\tensorboard\

Change manager.py

From:

serialize=lambda dt: int(dt - datetime.datetime.fromtimestamp(0)).total_seconds()),

To:

serialize=lambda dt: int(dt.strftime("%S")),

manager.py

Original source: http://www.programmersought.com/article/2977784478/

VnC
  • 1,936
  • 16
  • 26
Ankush
  • 61
  • 1
  • 6
  • Please don't use images in lieu of text that could easily be included in your answer. – chb May 18 '19 at 18:04
2

I had the same problem. It took me ages to figure out, but for me it worked to upgrade the Interpreter to Python 3.7.2 Which version are you currently using?

Lilly
  • 63
  • 4
2

Tensorboard 1.13.1 has a compatibility issue with Tensorflow 1.14.0rc1. Upgrading to the latest Tensorboard version fixes this issue.

Install latest Tensorboard version, which is the nightly build currently on the top of Tensorboard 1.13.1. It should solve the problem.

pip install tb-nightly

I tested this with the following configuration and it worked for me.

Python 3.6.6
Tensorflow 1.14.0rc1
Tensorboard 1.13.1
tb-nightly 1.14.0a20190611

References:

  1. https://github.com/tensorflow/tensorboard/issues/2106
  2. https://github.com/tensorflow/probability/issues/354
Sudheer Raja
  • 151
  • 1
  • 8
1

Had the same problem. As mentioned in this issue this problem is related to a bug in Python 3.6. You could fix it upgrading to Python 3.7. Check the aforementioned issue tracker for more info.

LaloGo
  • 66
  • 4