This lesson is being piloted (Beta version)

Tensorboard

Overview

Teaching: 20 min
Exercises: 0 min
Questions
  • What is Tensorboard and How to use?

Objectives
  • Open Tensorboard in M2

Tensorboard

Some of the useful things you can do with TensorBoard includes:

Let setup the procedure to open Tensorboard with M2 HPC

Open Terminal in Open OD or regular terminal, make sure that you are in the same node with Jupyter Lab instance.

Install Tensorboard

pip install tensorboard

Starting Tensorboard

In the previous episode, we already created the log files for CNN training under the same working folder (logs_CNN). Now, let’s load up the log files in the same directory:

# First activate the working conda environment:
source activate ~/tensorflow_2.9

# Second, change directory to where you have the log_CNN saved:
cd Workshop/SMU_DL

# Run the tensorboard with log data in the logs_CNN directory
tensorboard --logdir logs_CNN --host 0.0.0.0

The following information appears:

$ tensorboard --logdir logs_CNN --host 0.0.0.0
2022-03-21 14:41:55.277397: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/users/tuev/Applications/lib:/users/tuev/Applications/lib
2022-03-21 14:41:55.277464: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
/users/tuev/.conda/envs/ML_SKLN/lib/python3.6/site-packages/tensorboard_data_server/bin/server: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /users/tuev/.conda/envs/ML_SKLN/lib/python3.6/site-packages/tensorboard_data_server/bin/server)
TensorBoard 2.8.0 at http://0.0.0.0:6017/ (Press CTRL+C to quit)

From the above information, let’s remember the node number (p014) and the port number (6017) and these numbers are different for different users.

p014:6017

Setting up Socket Proxy

For Macs OS/Linux

$ ssh -D 6017 -C -q -N USERNAME@m2.smu.edu

For Window OS

image and select New SSH Tunnel:

image

image

image

Leave the Window on and open Firefox:

Setting up Firefox:

p014:6017

The Tensorboard window appears:

image

Key Points

  • Tensorboard