cancel
Showing results for 
Search instead for 
Did you mean: 

TensorBoard in SAP Data Intelligence

architectSAP
Active Contributor
0 Kudos

I try to run TensorBoard in my SAP Data Intelligence 3.0.3 Jupyter Notebook as per Get started with TensorBoard:

%load_ext tensorboard
import tensorflow as tf
import datetime
...
%tensorboard --logdir logs/fit
Reusing TensorBoard on port 6006 (pid 13735), started 0:06:13 ago. (Use '!kill 13735' to kill it.)

However, I got an error message: refused to connect.

Do I need to create another Ingress or so to make TensorBoard work?

Many thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

lochner_louw
Participant

Hi Frank,

From what I understand, only the port of the JupyterLab instance is forwarded by app router. This means that requests to https://di-instance/app/jupyter/ get forwarded to the correct port only for Jupyter and the port for TensorBoard won't be exposed. If you can figure out how forward requests to the TensorBoard instance running inside Jupyter, then that will be a great win.

When I tested this I found that "localhost" was hardcoded in the iframe for the TensorBoard version I used. In the latest version, you will see that there is an environment variable called "TENSORBOARD_PROXY_URL" that you can use to redirect it. (See this link)

My workaround for this to run TensorBoard as an app in SAP Data Intelligence and then setting "TENSORBOARD_PROXY_URL" to the URL for the TensorBoard app.

See my blog post (link) for how to run TensorBoard as an app inside SAP Data Intelligence. Note that I have not tested it with version 3 yet.

Here is a screenshot of what you tried to do:

NOTE: the --logdir /vhome/tf/train/linreg is just to get the command to run. I setup the TensorBoard app instance to read /vhome/tf by default.

I hope this answers your question.

Cheers,
Lochner

architectSAP
Active Contributor
0 Kudos

Thank you, Lochner.

This works perfectly.

Cheers

Answers (0)