Monitor, debug and profile the jobs running on Cloud accelerators like TPUs and GPUs.
Maintained. Last release over 2 years ago, commits in 11 of the last 26 weeks. Weaker on recent releases and release cadence.
pip install cloud-accelerator-diagnosticsCloud Accelerator Diagnostics
Overview
Cloud Accelerator Diagnostics is a library to monitor, debug and profile the workloads running on Cloud accelerators like TPUs and GPUs. Additionally, this library provides a streamlined approach to automatically upload data to Tensorboard Experiments in Vertex AI. The package allows users to create a Tensorboard instance and Experiments in Vertex AI, and upload logs to them.
Installation
To install the Cloud Accelerator Diagnostics package, run the following command:
pip install cloud-accelerator-diagnostics
Automating Uploads to Vertex AI Tensorboard
Before creating and uploading logs to Vertex AI Tensorboard, you must enable Vertex AI API in your Google Cloud console. Also, make sure to assign the Vertex AI User IAM role to the service account that will call the APIs in cloud-accelerator-diagnostics package. This is required to create and access the Vertex AI Tensorboard in the Google Cloud console.
Create Vertex AI Tensorboard
To learn about Vertex AI Tensorboard, visit this page.
Here is an example script to create a Vertex AI Tensorboard instance with the name test-instance in Google Cloud Project test-project.
Note: Vertex AI is available in only these regions.
from cloud_accelerator_diagnostics import tensorboard
instance_id = tensorboard.create_instance(project="test-project",
location="us-central1",
tensorboard_name="test-instance")
print("Vertex AI Tensorboard created: ", instance_id)
Create Vertex AI Experiment
To learn about Vertex AI Experiments, visit this page.
The following script will create a Vertex AI Experiment named test-experiment in your Google Cloud Project test-project. Here's how it handles attaching a Tensorboard instance:
Scenario 1: Tensorboard Instance Exist
If a Tensorboard instance named already exists in your project, the script will attach it to the new Experiment.