google-cloud-mldiagnostics
diagnostic packages for profiling and ML experiment management
What it is and what it does
Google Cloud ML Diagnostics is a Python SDK for integrating diagnostics into ML workloads running on Google Cloud. It lets you track machine learning runs, collect workload metrics (model quality, performance, system metrics), manage configs, and capture performance profiles using XProf—all visualized in the Google Cloud console. The package depends on google-api-core, google-auth, google-cloud-logging, psutil, packaging, and pynvml to communicate with Google Cloud services and gather system/GPU telemetry.
The SDK is designed for ML engineers to embed into their training or inference code on Google Cloud TPUs and GPUs. It works with orchestrators like Google Kubernetes Engine and custom setups. Metrics and profiles attach to a Machine Learning Run object, which can have multiple profiling sessions triggered either programmatically or on-demand from the UI. The package requires Python 3.8 or later and specific Google Cloud IAM permissions to function.
Use it for:
- Track metrics and profiles for JAX training runs on Google Cloud TPUs to identify performance bottlenecks.
- Collect system metrics (CPU, memory, GPU utilization) alongside model performance during inference workloads.
- Manage and version workload configs (software, system, user-defined) for reproducible ML experiments.
- Trigger XProf profiling sessions programmatically from within your ML code to capture performance data at key training steps.
- Collaborate on ML run diagnostics using shareable links to profiles and run metadata in the Google Cloud console.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Collects metrics, configs, and performance profiles from ML workloads running on Google Cloud TPUs and GPUs, integrating with Google Cloud Logging and XProf for centralized diagnostics.
Yes, if you run ML workloads on Google Cloud TPUs or GPUs and need integrated diagnostics. The low install friction, active maintenance, and permissive license make it a straightforward add to JAX-based projects. Requires upfront Google Cloud setup (API enablement, IAM roles, Log Analytics) and is tightly coupled to Google Cloud infrastructure—not suitable for on-premises or non-Google-Cloud deployments.
Install
google-cloud-mldiagnostics on PyPI
pip
pip install google-cloud-mldiagnosticsuv
uv add google-cloud-mldiagnosticspoetry
poetry add google-cloud-mldiagnosticsInstalling google-cloud-mldiagnostics
Before you install
Low friction: pure Python wheel with 6 runtime dependencies (google-api-core, google-auth, google-cloud-logging, psutil, packaging, pynvml). Active maintenance as of 9 days ago.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most production environments.
Quickstart
pip install google-cloud-mldiagnostics
from google.cloud import mldiagnostics
# Integrate with your ML workload to track metrics and profiles
Requires Google Cloud project with Cluster Director API enabled, appropriate IAM roles (clusterdirector.editor, logging.logWriter, storage.objectUser), and Log Analytics enabled on Cloud Logging _Default bucket.
Verify before relying
- Whether the package works with frameworks beyond JAX (description says 'JAX on Google Cloud TPUs and GPUs today').
- Whether multi-host profiling requires additional setup beyond the SDK itself.
- Performance overhead of metrics collection on large-scale workloads.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — google-api-core, google-auth, google-cloud-logging, psutil, packaging, pynvml |
| Maintenance | actively maintained — 9 days since the last release |
| First released | |
| Downloads | 268,054/month — #8,284 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_cloud_mldiagnostics-1.0.7-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
cloud-accelerator-diagnosticsMonitors, debugs, and profiles workloads…
unclear · top 15,000 on PyPI
ml-goodput-measurementMeasures and monitors the productive…
unclear · top 15,000 on PyPI
pathwaysutilsProvides cloud-specific integrations and…
permissive · top 15,000 on PyPI
xprofXProf is a profiler for ML workloads that…
permissive · top 15,000 on PyPI
tensorboard-plugin-profileProvides a TensorBoard plugin and standalone…
permissive · top 5,000 on PyPI
tpu-infoCLI tool that detects Cloud TPU devices and…
permissive · top 15,000 on PyPI
google-cloud-profilerCollects and uploads CPU, memory, and wall-time…
permissive · top 15,000 on PyPI
torch-tb-profilerIntegrates PyTorch profiling data with…
permissive · top 15,000 on PyPI
azureml-telemetryCollects telemetry data from Python code by…
unclear · top 15,000 on PyPI
sagemaker-data-insightsComputes ML-relevant statistical summaries of…
unclear · top 15,000 on PyPI