Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Image Summaries not displayed (E0905 Error on request) #477

Closed
untom opened this issue Sep 5, 2017 · 7 comments
Closed

Bug: Image Summaries not displayed (E0905 Error on request) #477

untom opened this issue Sep 5, 2017 · 7 comments
Assignees

Comments

@untom
Copy link

untom commented Sep 5, 2017

I'm using Tensorflow 1.3, and have image summaries in my code that I would like to display in TB. However, when I switch to the "image" tab in the browser I see only empty images:

screenshot_2017-09-05_17-02-46

The following error appears in the shell where TB has been started:

tensorboard --logdir . --port 6034
E0905 16:59:54.859616 Thread-16 _internal.py:87] Error on request:
Traceback (most recent call last):
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/werkzeug/serving.py", line 209, in run_wsgi
    execute(self.server.app)
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/werkzeug/serving.py", line 197, in execute
    application_iter = app(environ, start_response)
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/tensorboard/backend/application.py", line 239, in __call__
    return self.data_applications[clean_path](environ, start_response)
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/werkzeug/wrappers.py", line 301, in application
    return f(*args[:-2] + (request,))(*args[-2:])
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/tensorboard/plugins/image/images_plugin.py", line 105, in _serve_image_metadata
    images = self._multiplexer.Tensors(run, tag)
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/tensorboard/backend/event_processing/event_multiplexer.py", line 358, in Tensors
    accumulator = self.GetAccumulator(run)
  File "/system/apps/biosoft/python-361/lib/python3.6/site-packages/tensorboard/backend/event_processing/event_multiplexer.py", line 434, in GetAccumulator
    return self._accumulators[run]
KeyError: '170905_1632_gdcgan_ddcgan-big_z32_l1e-05_l2p0e 00_d3_eps1.00_lds1e 00_smry'
[... snip, the error repeats a lot of times ... ]

As the KeyError also indicates, I think this is due to the name of the directory containing the logfile information ("170905_1632_gdcgan_ddcgan-big_z32_l1e-05_l2p0e 00_d3_eps1.00_lds1e 00_smry", because if I start TB inside of this directory, then the images are displayed without problems).

@chihuahua
Copy link
Member

To be clear, is 170905_1632_gdcgan_ddcgan-big_z32_l1e-05_l2p0e 00_d3_eps1.00_lds1e 00_smry a single directory (with that name) on your machine? Or 3 separate directories? Thank you for reporting.

@untom
Copy link
Author

untom commented Sep 5, 2017

It's one single directory name. There are originally no spaces in that name at all, the + signs seem to have gotten lost in the copy'n'paste, but you can still see them in the screenshot.

@untom
Copy link
Author

untom commented Sep 5, 2017

(or maybe the bug itself is that the '+' sign gets lost somewhere within TB?)

@chihuahua
Copy link
Member

I can repro. The run seen by TensorBoard is indeed 170905_1632_gdcgan_ddcgan-big_z32_l1e-05_l2p0e+00_d3_eps1.00_lds1e+00_smry (with the plus sign).

It seems like werkzeug is losing + characters and replacing them with spaces while decoding the GET param. Let me think about what we can do ...

@chihuahua
Copy link
Member

For now, indeed not using + in directory names will let you circumvent this issue. On our side, we should still fix this issue though because it is unexpected to users.

@wchargin
Copy link
Contributor

wchargin commented Sep 6, 2017

let me think about what we should do

The frontend should use window.encodeURIComponent on portions of a string that may contain arbitrary text:

encodeURIComponent("a+b")  // "a%2Bb"

@chihuahua
Copy link
Member

Ah, it's a good thing you chimed in. I was thinking over why encodeURI('a+b') outputted a+b with no replacement, but it seems like encodeURIComponent is the way to go.

chihuahua added a commit that referenced this issue Sep 6, 2017
This change encodes the names of runs and tags included within the GET
parameters of URIs for the audio, image, and pr_curve plugins. We pass
those run and tag names into encodeURIComponent.

Fixes #477. I verified that the audio, image, and PR curve plugins WAI.
@chihuahua chihuahua self-assigned this Sep 6, 2017
chihuahua added a commit that referenced this issue Sep 6, 2017
This change encodes the names of runs and tags included within the GET
parameters of URIs for the audio, image, and pr_curve plugins. We pass
those run and tag names into encodeURIComponent.

Fixes #477. I verified that the audio, image, and PR curve plugins WAI.
jart pushed a commit to jart/tensorboard that referenced this issue Sep 6, 2017
This change encodes the names of runs and tags included within the GET
parameters of URIs for the audio, image, and pr_curve plugins. We pass
those run and tag names into encodeURIComponent.

Fixes tensorflow#477. I verified that the audio, image, and PR curve plugins WAI.
jart pushed a commit that referenced this issue Sep 6, 2017
This change encodes the names of runs and tags included within the GET
parameters of URIs for the audio, image, and pr_curve plugins. We pass
those run and tag names into encodeURIComponent.

Fixes #477. I verified that the audio, image, and PR curve plugins WAI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants