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

[profile] make trace viewer respect --path_prefix #2276

Merged
merged 1 commit into from
May 24, 2019

Conversation

nfelt
Copy link
Contributor

@nfelt nfelt commented May 24, 2019

Fixes #2263.

The trace viewer logic was hardcoded to use absolute paths (relative to the hostname), which doesn't work when --path_prefix is set. As far as I can tell there is no particular reason why the trace viewer shouldn't use relative path names like the rest of TensorBoard, and the code that forced the absolute path has been around since the profile plugin was introduced, so I suspect it's just outdated.

Tested by running tensorboard --path_prefix /mypath/ and then putting nginx in front of it as follows:

echo 'events {} http { access_log stdout; error_log stderr; server { listen 8080; server_name localhost; proxy_buffering off; location /mypath/ { proxy_pass http://localhost:6006; }}}' > /tmp/nginx.conf && sudo nginx -g 'daemon off;' -/tmp/nginx.conf

Confirmed that the previously broken trace viewer now loads demo data correctly when accessed via http://localhost:8080/mypath/. I also ran tensorboard without a path prefix and confirmed the trace viewer still loads correctly in that case as well.

Copy link
Contributor

@qiuminxu qiuminxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works! I think it is outdated. Thanks for fixing this.

@nfelt nfelt merged commit 399b86b into tensorflow:master May 24, 2019
@nfelt nfelt deleted the trace-viewer-path-prefix branch May 24, 2019 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile plugin does not respect --path_prefix when serving trace_viewer_index.html
2 participants