Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to locally view tensorboard of remote server

Using my own laptop to run Tensorflow on remote server of lab

I used tensorboard --logdir=./log try to view curves of the running results

I got:

 Starting TensorBoard  on port 6006
(You can navigate to http://0.0.0.0:6006)

and then I tried to connect it in the browser, but it failed...

anyone know how to configure in order to view tensorboard of remote server on my own laptop?

like image 414
Xuchen Liu Avatar asked Jul 19 '16 17:07

Xuchen Liu


People also ask

How do I access TensorBoard from a remote server?

Connect to the server by transferring port 6006 of the remote server into a port you like to view the Tensorboard (like 16006).

Can you run TensorBoard while training?

You can visualize the model graph, losses, accuracy, etc when your model is under training. It is a very helpful tool that can be used to monitor the model that is getting trained on a large dataset. You can use Tensorboard not only with TensorFlow but also with Keras.

What port does TensorBoard use?

where the -p 6006 is the default port of TensorBoard.


2 Answers

If you start the tensorboard server on your lab instance using the command you mentioned, it will be running on the lab server and hosting the tensorboard webpage from labserverIP:6006.

I use a cluster running SLURM (which manages everyone's job submissions) and am able to start the tensorboard server on cluster node and then SSH into the specific node running the tensorboard server and essentially forward the site from from the labserverIP:6006 to my laptop at localhost:6006. My script on github here shows the commands I use to do this for SLURM. Essentially it is these three steps:

1) Start the remote server and run tensorboard --logdir=./log --host $SERVER_IP --port $SERVER_PORT

2) SSH from your laptop using ssh [email protected] -L $LOCAL_PORT:$SERVER_IP:$SERVER_PORT

You can replace [email protected] with the server public IP.

3) Got to http://localhost:$LOCAL_PORT in your laptop's browser to access the tensorboard page.

The other option is to copy all of the log files to your local machine or a shared drive and then start tensorboard on your laptop with the local or shared directory as your logdir.

like image 54
Taylor Paul Avatar answered Sep 28 '22 04:09

Taylor Paul


This is how I can forward a port at remote server to my local home computer

ssh -NfL 6006:localhost:6006 username@remote_server_address

like image 24
Dat Avatar answered Sep 28 '22 06:09

Dat