TPU Monitoring Dashboard
Project description
TPU-TOP
A modern, terminal-based monitoring dashboard for Google Cloud TPUs, designed to give you real-time visibility into your machine's performance.
GitHub Repository | PyPI Project
Project Overview
tpu-top provides a visual, interactive TUI (Terminal User Interface) to monitor system and TPU resources. It is specifically tailored for high-performance computing environments like GKE (Google Kubernetes Engine) where deep learning models are trained on TPUs.
Key Features
- Responsive Layout: Automatically switches between 2x2 grid and 1x4 list for graphs based on terminal height.
- Priority-Based Rendering: Dynamically shrinks or drops panels (Processes panel shrinks first) to fit severe vertical constraints.
- Device Status Table: Detailed per-device breakdown showing duty cycle and memory usage. Compact 1-line layout for single-core TPUs (v6e) and multi-line for multi-core (v7).
- Process Monitor: Lists active processes, prioritized by TPU processes (sorted by TPU index) and then CPU processes (sorted by memory usage).
- Google Brand Styling: Color-coded graphs using Google's signature color palette (Blue, Red, Yellow, Green).
- Version Awareness: Displays
tpu-top,libtpu, andtpu-infoversions directly in the header alongside detected TPU generation.
Installation
From PyPI (Recommended)
pip install tpu-top
From Source
You can also install tpu-top directly from the source directory.
Prerequisites
Ensure you have Python 3.12+ and access to a Cloud TPU environment. The tool relies on tpu-info to communicate with the TPU driver.
Standard Source Install
Navigate to the project root directory and run:
pip install .
Developer Install
If you are making modifications and want them to reflect immediately:
pip install -e .
How to Use
Once installed, you can launch the dashboard from anywhere in your terminal:
tpu-top
Environment Variables
TPU_TOP_MOCK=1: Force mock mode for testing on machines without physical TPUs.TPU_TOP_ITERATIONS=N: Run for exactlyNrefresh cycles and exit (useful for automated tests).
Running Tests
To validate changes, run the unit tests:
python -m unittest test_main.py
(Note: If testing inside a GKE container, ensure dependencies are installed in your target environment).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tpu_top-0.1.3.tar.gz.
File metadata
- Download URL: tpu_top-0.1.3.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e627910287f06d5a4d0c51f4738e3dbbc74fa08c7a6ed968fe4bae5e502629b2
|
|
| MD5 |
129b4441c5c60b80f9b461a1807489b9
|
|
| BLAKE2b-256 |
1b08a2f269ef04dcd8523ce931052765b09b0e3345f91c09d1615f3186badd77
|
File details
Details for the file tpu_top-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tpu_top-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27201c0765ca4dc5512f37bb4e352770fa39ae2ef41d34b894cff2e5c26229f7
|
|
| MD5 |
7b2fb73c819ad6854a1cec7b1c8f2936
|
|
| BLAKE2b-256 |
0df3a97f986e4e4493dbb6ec77d86c9d955da42cf3c1a153ff7f7a1d008c93e8
|