Tensorboard: --path_prefix broken in 2.4.0

Created on 3 Dec 2020  路  4Comments  路  Source: tensorflow/tensorboard

Describe the current behavior

Some tensorboards installed with tensorflow couldn't access the right URLs.

Reproducible steps

  1. install a tf 2.3.1
  2. start tensorboard with prefix
tensorboard --logdir logs --port 5001 --bind_all  --path_prefix /abc/def

We got failed to fetch runs

image

Because some requests did not add abc/def prefix to the base URL:

image

Describe the expected behavior

All tensorboard requests should add prefix to the base URL if --path_prefix has given.

Standalone code to reproduce the issue

I created a regression tests project to investigate the problem

https://github.com/qrtt1/tensorboard-regression/runs/1487646153

It got worse after tf 2.3.0 (they use tensorboard 2.4.0):

image

frontend bug

Most helpful comment

Thanks for the report. I was able to reproduce it and it is a serious regression. It is quite interesting to see a puppeteer based tests that catches regression for TensorBoard :)

For TensorBoarder:

This change is related to the router in the 2.4.0. In the release, we introduced a handrolled router which is unaware of notion of path prefix and eagerly redirects "/foo/bar/index.html" to "/" which breaks all the subsequent requests. Few ways to move forward:

  • make the request to "/environments" before bootstrapping components to fetch the path_prefix

    • this is a bit nasty because environment has an experiment specific data_location. I think we should disentangle global setting vs. per-exp settings

    • period of blank page until the request is successful

  • invest in the dehydration/rehydration scheme to populate some state when flushing down the HTML
  • use cookie/query-param or whatever to achieve the same effect of dehydration

All 4 comments

Thanks for the report. I was able to reproduce it and it is a serious regression. It is quite interesting to see a puppeteer based tests that catches regression for TensorBoard :)

For TensorBoarder:

This change is related to the router in the 2.4.0. In the release, we introduced a handrolled router which is unaware of notion of path prefix and eagerly redirects "/foo/bar/index.html" to "/" which breaks all the subsequent requests. Few ways to move forward:

  • make the request to "/environments" before bootstrapping components to fetch the path_prefix

    • this is a bit nasty because environment has an experiment specific data_location. I think we should disentangle global setting vs. per-exp settings

    • period of blank page until the request is successful

  • invest in the dehydration/rehydration scheme to populate some state when flushing down the HTML
  • use cookie/query-param or whatever to achieve the same effect of dehydration

@stephanwlee I just ran into this and it's nice to see that you just merged #4423, thank you! Any chance we might be able to get a patch release of 2.4 with this fix backported?

We do plan to publish a patch release. I鈥檝e filed #4547 to track it.

TensorBoard 2.4.1 shipped with this patch.

Was this page helpful?
0 / 5 - 0 ratings