--- id: cloud-tpu-diagnostics version: "0.1.5" license: unclear license_treatment: unclear maintenance: active --- # cloud-tpu-diagnostics — Monitor, debug and profile the jobs running on Cloud TPU. License: unclear · Maintenance: active · Downloads: 191.1K/mo ## 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 above — 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 pip install cloud-tpu-diagnostics uv add cloud-tpu-diagnostics 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_current - Install friction: low - Maintenance: active - Downloads: 191.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cloud tpu debugging, stack trace collection, tpu diagnostics monitoring, cloud tpu profiling, tpu job debugging, fault detection tpu, tpu performance monitoring, tpu-specific, debugging, cloud-native [View on SkillFed](https://skillfed.io/packages/cloud-tpu-diagnostics) · [View on PyPI](https://pypi.org/project/cloud-tpu-diagnostics/)