Tensorboardx: add_text not working with tensorboard > 1.6

Created on 1 May 2018  路  9Comments  路  Source: lanpa/tensorboardX

First I just want to say this is a fantastic library! Really useful work.

Second, I just tried add_text and found that the results come up blank in tensorboard >= 1.7, but it works with tensorboard 1.6.

I installed the tensorboardX package from source.

I'm not sure if this is a tensorboardX issue or a tensorboard issue, but I thought it was worth bringing up.

Thanks,
Tom

Most helpful comment

@teffland @janstria You can replace continue with pass https://github.com/tensorflow/tensorboard/blob/75fd16b9c7957057924d586507fe928ebc2e75ab/tensorboard/plugins/text/text_plugin.py#L285 for a temporary fix (in your pip install). I will rewrite add_text in accordance with the new tensorboard plugin API.

All 9 comments

I confirm that add_text does not work in the version 1.2 with TensorBoard 1.8.

@teffland @janstria You can replace continue with pass https://github.com/tensorflow/tensorboard/blob/75fd16b9c7957057924d586507fe928ebc2e75ab/tensorboard/plugins/text/text_plugin.py#L285 for a temporary fix (in your pip install). I will rewrite add_text in accordance with the new tensorboard plugin API.

Encountered the same problem with TensorBoard 1.7.0 .

fixed in f76e92be99cb4415c03f474d77ab09915bce6d55

@lanpa Thank you!

Hello

I am having the same issue with the following config
tensorflow 1.9.0
tensorboard 1.9.0
tensorboardx 1.2

Here is a minimal example:
from tensorboardX import SummaryWriter
writer = SummaryWriter(log_dir='logs')
writer.add_text('MyTag', 'This text should be displayed', 0)

If I then run tensorboard --logdir logs, then the text appears as an empty box in the text DashBoard.
It was not the case with previous version of tensorboard.

What I found:
1) If I open the tensorflow events file in a text editor, I can see that the text is stored.
2) The dashboard display an empty box for text, so tensorboard see that there is a text
3) If I try to add text a text summary from with tensorflow, it is displayed in the text dashboard.
I am not familiar enough with tensorflow to reproduce the same equivalent code with tensorflow.summary.text function. This would be useful to compare the tensorflow events file.

I can reproduce this bug on Mac OS X, Linux Mint, Arch Linux...
How did you guys got it to work ?

@rivaud I tried your code and noted the same issue. Later I added a writer.close() after add_text and the string appears. Please try this.

EDIT: I fixed it by using pip install tensorboardX --upgrade. It installed tensorboardX 1.4 and now the text is displayed.

@lanpa I can confirm @rivaud bug report. Here is the code

In [1]: from tensorboardX import SummaryWriter

In [2]: writer = SummaryWriter(log_dir='logs')

In [3]: writer.add_text('MyTag', 'This text should be displayed', 0)

In [4]: writer.close()

Then I do tensorboard --logdir logs. This is the output I get
screenshot from 2018-09-13 10-37-14

My package configs are as follows: (output of conda list | grep tensor)
tensorboard 1.9.0 py36_0 conda-forge
tensorboardX 1.2
tensorflow 1.9.0 py36_0 conda-forge
tensorflow-base 1.9.0 gpu_py36h6ecc378_0
tensorflow-gpu 1.9.0 hf154084_0

Like @rivaud said, I can see the text inside logs/plugins/tensorboard_text/tensors.json (although with some cryptic things). Not very clear what the bug is. Any help is appreciated.

@TheShadow29 Thanks for the verification.

Was this page helpful?
0 / 5 - 0 ratings