Enable access to Tensorboard

A short guide how to enable tensorboard access

Tensorboard is installed together with Tensorflow so once you launch our Jupyter notebook, it will already be available there. In this short guide we will create some sample data that tensorboard can visualize.


If you already have tensorboard log dir:

  1. Open terminal in Jupyter notebook and start it:

    tensorboard --logdir=./graphs --port 6006
  2. Go to your runners page, select your runner and click on the left button to enable the tensorboard tunnel:

    Task button to enable tensorboard

  3. Now, refresh your Jupyter window. Just above the notebook view you will see a Tensorboard link:

    Link to tensorboard

That’s it, click on it and you should be able to access tensorboard:

Tensorboard UI

Setting up tensorboard

In order to use tensorboard, you need to write tensorflow summaries to files. Let’s create a simple Python script that will write a summary:

# gen.py
import tensorflow as tf
tf.reset_default_graph() # To clear the defined variables and operations of the previous cell
# create graph
a = tf.constant(2)
b = tf.constant(3)
c = tf.add(a, b)
# launch the graph in a session
with tf.Session() as sess:
    # creating the writer inside the session
    writer = tf.summary.FileWriter('./graphs', sess.graph)

Now, create a directory called graphs. Once you have the directory, run our Python script:

python gen.py

It will create a new file under graphs/ directory. In order to start tensorboard server, use terminal:

tensorboard --logdir=./graphs --port 6006

This will start an HTTP server inside your Jupyter notebook. To access it, follow the steps from the quick start