-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve handling of tensorboard #2126
Improve handling of tensorboard #2126
Conversation
for more information, see https://pre-commit.ci
@twalcari sorry for not mentioning it earlier, please update the following doc: https://github.com/jupyter/docker-stacks/blob/main/docs/using/selecting.md#jupytertensorflow-notebook |
@mathbunnyru, @consideRatio, @yuvipanda, and @manics, please vote 👍 to accept this change and 👎 not to accept it (use a reaction to this message) The voting deadline is the 1st of August (a week since I posted this message). We can have a discussion until the deadline, so please express your opinions. |
What do you want me to add there? Tensorboard is an utility that is distributed together with tensorflow, so I don't think we should mention it separately? Do I need to mention jupyter-server-proxy there? |
I would only mention |
Describe your changes
Problem statement
Tensorboard is a utility that is frequently used by developers working with TensorFlow or PyTorch to visually inspect their work. It is included by default when installing TensorFlow, and is even part of the very first Get Started notebook of TensorFlow. It integrates into Jupyter notebooks via an extension (
%load_ext tensorboard
), after which you can request the TensorBoard UI via the magic command%tensorboard
.TensorBoard works by launching an additional process which listens on port 6006 (typically). However, this means that you also need to expose that extra port when starting an
tensorflow-notebook
instance:docker run -p 10000:8888 -p 6006:6006 quay.io/jupyter/jupyter-notebook:latest
.If you fail to do this, you are greeted with a "Connection refused" error:
The situation is even more problematic when the image is started via JupyterHub: in many cases the user cannot open an extra port, and certainly not on port 6006.
Proposed solution
After looking into how CoLab solved this problem, I found an environment variable
TENSORBOARD_PROXY_URL
that can be used to specify a custom target location of theiframe
being injected into the notebook.This PR does 2 things:
jupyter-server-proxy
to the imageTENSORBOARD_PROXY_URL
environment variable to use jupyter-server-proxy. It's done in a way that works both in the standalone case and in the JupyterHub case.Issue ticket if applicable
Checklist (especially for first-time contributors)