Vertex TensorBoard is an enterprise ready, managed version of TensorBoard, which is a Google open source project for Machine Learning experimental visualization.
TensorBoard provides a variety of detailed visualizations, which includes:
- Tracking and visualizing metrics such as loss and accuracy over time
- Visualizing a model computational graph (ops and layers)
- Viewing histograms of weights, biases, or other tensors as they change over time
- Projecting embeddings to a lower dimensional space
- Displaying image, text, and audio samples
- Profiling TensorFlow programs
With Vertex TensorBoard you can track, visualize, and compare ML experiments and share them with your team. In addition to the powerful visualizations from open source TensorBoard, Vertex TensorBoard provides:
A persistent, shareable link to your experiment's dashboard
A searchable list of all experiments in a project
Tight integrations with Vertex AI services for model training
Enterprise-grade security, privacy, and compliance
Before using Vertex TensorBoard, you need to create a managed TensorBoard instance. A TensorBoard instance is a regionalized resource which stores your Vertex TensorBoard experiments. You can create multiple TensorBoard instances in a project.
Create a Vertex TensorBoard instance
You can create a TensorBoard instance from the Cloud Console by following these steps.
- If you are new to Vertex AI or starting a new project, set up your project and development environment.
In the Vertex AI section of the Google Cloud Console, go to
the Experiments page.
Go to the Experiments page
- Navigate to the TensorBoard Instances tab.
- Click Create at the top of the page.
- Modify the TensorBoard instance name field to create a descriptive display name.
- Select a region from the Region drop-down list and optionally add a description.
- Click Create to create your TensorBoard instance.
Alternatively, you can create a TensorBoard instance from the gcloud CLI.
Initialize the Cloud SDK by running
Install the gcloud beta component, as Vertex TensorBoard is in Preview.
gcloud components install beta gcloud components update
Commands for Vertex TensorBoard are now accessible. Explore the commands to confirm installation.
gcloud alpha ai tensorboards --help
The commands include
delete. If needed, you can follow these steps to set default values for your project and region before proceeding.
Now, you can create a TensorBoard instance.
Authenticate to gcloud.
gcloud auth application-default login
Create a TensorBoard instance by providing a project name and a display name. This step might take a few minutes to complete for the first time in a project. Make note of the TensorBoard instance name (for example:
projects/123/locations/us-central1/tensorboards/456) that will be printed at the end of the following command; it will be required in the later steps.
gcloud beta ai tensorboards create --display-name DISPLAY_NAME \ --project PROJECT_NAME
Replace the following:
DISPLAY_NAME: a descriptive name for the TensorBoard instance
PROJECT_NAME: the project you wish to create the TensorBoard instance in
Using Vertex TensorBoard
TensorBoard is an open source visualization and analysis toolkit. In order to visualize experiments using Vertex TensorBoard you need to use TensorBoard APIs to prepare your TensorBoard logs. These logs can then be uploaded or streamed into your Vertex TensorBoard instance.
For more information on TensorBoard APIs, visit the TensorBoard open source docs.
Uploading TensorBoard logs with the Vertex TensorBoard Uploader
Vertex TensorBoard offers a Python CLI for uploading TensorBoard logs. You can use this to upload logs from any environment which can connect to Google Cloud.
Creating a virtual environment (optional)
Optional, but recommended first step: create a dedicated virtual environment to install the Vertex TensorBoard Uploader Python CLI.
python3 -m venv PATH/TO/VIRTUAL/ENVIRONMENT source PATH/TO/VIRTUAL/ENVIRONMENT/bin/activate
PATH/TO/VIRTUAL/ENVIRONMENT with the path to
your dedicated virtual environment.
Install the Vertex TensorBoard Uploader through Vertex AI SDK
The uploader needs the latest version of pip in order to get installed properly.
pip install -U pip pip install google-cloud-aiplatform[tensorboard]
Uploading TensorBoard logs
tb-gcp-uploader --tensorboard_resource_name TENSORBOARD_INSTANCE_NAME \ --logdir=LOG_DIR \ --experiment_name=TB_EXPERIMENT_NAME --one_shot=True
Replace the following:
LOG_DIR: the location of the event logs, which can reside either in the local file system or Cloud Storage
TENSORBOARD_INSTANCE_NAME: the name of the previously created TensorBoard resource that is printed at the end of the
gcloud beta ai tensorboards createcommand.
TB_EXPERIMENT_NAME: the name of the experiment; for example
test-experiment. The experiment name should be unique within a TensorBoard resource
The uploader CLI by default runs indefinitely, monitoring changes in the LOG_DIR,
and uploads newly added logs.
--one_shot=True disables the
behavior. You can run
tb-gcp-uploader --help for more information.
The CLI will output a link to the Vertex TensorBoard in the first few lines
of the log where you can view your experiment. For example:
View your Tensorboard at
Viewing a Vertex TensorBoard experiment
You can view your Vertex TensorBoard experiment from the Google Cloud Console with the following steps.
In the Vertex AI section of the Google Cloud Console, go to the Experiments page.
From the experiments tab, scroll or filter the experiments list to find your experiment.
Click Open TensorBoard next to your experiment to open the Vertex TensorBoard UI.
If you use Vertex TensorBoard with custom training, an Open TensorBoard button appears on the top of the Training Job details page after selecting the training job from the Training page.