Hassan Abedi
Hassan Abedi

Reputation: 900

How to use Tensorboard within a notebook running on Amazon SageMaker Studio Lab?

I have a Jupyter notebook running within an Amazon SageMaker Studio Lab (https://studiolab.sagemaker.aws/) environment, and I want to use Tensordboard to monitor my model's performance inside the notebook.

I have used the following commands to set up the Tensorboard:

%load_ext tensorboard
# tb_log_dir variable holds the path to the log directory
%tensorboard --logdir tb_log_dir

But nothing shows up in the output of the cell where I execute the commands. See:

enter image description here

The two buttons shown in the picture are not responding, BTW.

How to solve this problem? Any suggestions would be appreciated.

Upvotes: 3

Views: 1089

Answers (1)

rok
rok

Reputation: 2765

I would try the canonical way to use tensorboard in AWS Sagemaker, it should be supported also by Studio Lab, it is described here. Basically install tensorboard and using the EFS_PATH_LOG_DIR launch tensorboard using the embedded console (you can do the following also from a cell):

pip install tensorboard
tensorboard --logdir <EFS_PATH_LOG_DIR>

Be careful with the EFS_PATH_LOG_DIR, be sure this folder is valida path from the location you are, for example by default you are located in studio-lab-user/sagemaker-studiolab-notebooks/ so the proper command would be !tensorboard --logdir logs/fit.

Then open a browser to:

https://<YOUR URL>/studiolab/default/jupyter/proxy/6006/

Upvotes: 1

Related Questions