skillfed

cloud-tpu-diagnostics

Monitor, debug and profile the jobs running on Cloud TPU.

cloud-tpu-diagnostics v0.1.5 191.1K downloads/30d#9,891 on PyPI17
License unclear Active released

What it is and what it does

Cloud TPU Diagnostics is a debugging and monitoring library for workloads running on Google Cloud TPU. It captures Python stack traces when faults occur (segmentation faults, floating-point exceptions, illegal operations) and can periodically collect snapshots to identify where a job is hung. Stack traces can be displayed on the console or uploaded to Google Cloud Logging for centralized troubleshooting.

The package is configured through a composition of configuration objects: you define stack trace behavior (whether to collect, where to send them, and how often), wrap that in a debug configuration, then wrap that in a diagnostic configuration, and finally use a context manager around the code you want to monitor. It has no external runtime dependencies and installs as a pure Python wheel, making it straightforward to add to a TPU VM.

Use it for:

  • Capture stack traces when a TPU job crashes with a segmentation fault or other signal to diagnose the root cause.
  • Periodically snapshot the call stack of a hung TPU workload to identify where it is stuck.
  • Upload diagnostic traces to Google Cloud Logging for centralized analysis and troubleshooting across multiple TPU jobs.
  • Debug training or inference jobs on Cloud TPU by collecting stack traces at configurable intervals (default 10 minutes).

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Collects stack traces and diagnostic data from jobs running on Cloud TPU, capturing faults and periodic snapshots to help debug hung or failing workloads.

Yes, if you run workloads on Cloud TPU and need built-in fault and hang diagnostics. The package is actively maintained, has no external dependencies, and integrates directly with Google Cloud Logging. However, verify the license terms before production use, and confirm it meets your TPU environment's requirements.

Install

cloud-tpu-diagnostics on PyPI

pip

pip install cloud-tpu-diagnostics

uv

uv add cloud-tpu-diagnostics

poetry

poetry add cloud-tpu-diagnostics

Installing cloud-tpu-diagnostics

Before you install

Low friction installation as a pure Python wheel with no runtime dependencies. Actively maintained as of 2026-04-08 with recent updates, though the project remains relatively young (first released 2023-06-07).

License in practice

License status is unclear—the package metadata lists no SPDX identifier or raw license text. Before production use, verify the actual license terms in the repository.

Quickstart

from cloud_tpu_diagnostics import diagnostic
from cloud_tpu_diagnostics.configuration import stack_trace_configuration, diagnostic_configuration, debug_configuration

stack_trace_config = stack_trace_configuration.StackTraceConfig(collect_stack_trace=True, stack_trace_to_cloud=True)
debug_config = debug_configuration.DebugConfig(stack_trace_config=stack_trace_config)
diagnostic_config = diagnostic_configuration.DiagnosticConfig(debug_config=debug_config)

with diagnostic.diagnose(diagnostic_config):
    run_job()

Designed for use on Cloud TPU VMs; stack trace collection and cloud upload features require a TPU environment and Google Cloud credentials.

Verify before relying

  • Exact scope of what 'monitor' and 'profile' capabilities include beyond stack trace collection.
  • Whether the package works on non-TPU systems or is strictly TPU-only.
  • Performance overhead of periodic stack trace collection at different intervals.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 980 days since the last release
Last repo commit
First released
Downloads 191,100/month — #9,891 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cloud_tpu_diagnostics-0.1.5-py3-none-any.whl

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

cloud tpu debuggingstack trace collectiontpu diagnostics monitoringcloud tpu profilingtpu job debuggingfault detection tputpu performance monitoring
tpu-specificdebuggingcloud-native

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

google-cloud-tpu

Provides a Python client library to interact…

permissive · top 15,000 on PyPI

google-cloud-profiler

Collects and uploads CPU, memory, and wall-time…

permissive · top 15,000 on PyPI

cloud-accelerator-diagnostics

Monitors, debugs, and profiles workloads…

unclear · top 15,000 on PyPI

tpu-info

CLI tool that detects Cloud TPU devices and…

permissive · top 15,000 on PyPI

slurm-usage

Collects and preserves SLURM job efficiency…

permissive · top 15,000 on PyPI

opentelemetry-exporter-gcp-trace

Exports OpenTelemetry traces to Google Cloud…

permissive · top 5,000 on PyPI

google-cloud-mldiagnostics

Collects metrics, configs, and performance…

permissive · top 15,000 on PyPI

osprofiler

OSProfiler generates distributed request traces…

permissive · top 15,000 on PyPI

libtpu

libtpu is the runtime library that enables JAX,…

unclear · top 5,000 on PyPI

oslo.reports

oslo.reports generates structured debug reports…

permissive · top 15,000 on PyPI