A lightweight napari dock widget for monitoring hardware and UI responsiveness during local AI and image analysis workflows.
Project description
napari-hardware-monitor
Lightweight local hardware and responsiveness monitoring for napari.
napari-hardware-monitor adds a compact dashboard dock for watching napari health, CPU, system memory, GPU activity, and GPU memory while image-analysis and local AI workflows run. It is designed for users who want immediate visibility into whether napari is responding normally and whether segmentation models, vision models, or large image data are putting pressure on the machine.
First Release
Version 1.0.0 focuses on a small, reliable monitor:
- obvious napari Health card for UI responsiveness
- event-loop delay readout for spotting lag or recent freezes
- short health hints for likely causes such as CPU saturation, memory pressure, or main-thread blocking
- compact dark dashboard with gauge cards and short history traces
- CPU utilization
- optional per-core CPU utilization
- system memory usage
- NVIDIA GPU utilization through
nvidia-smi - NVIDIA VRAM usage when reported by the driver
- GPU temperature and power draw
- Start / Pause monitoring
- refresh interval selector
- Float button for detaching the monitor dock when napari exposes a dock container
- Copy Snapshot for bug reports, benchmarking notes, or reproducibility records
Per-core CPU detail is collapsed by default. The main view stays focused on the common question: is the workflow limited by CPU, RAM, GPU, or VRAM?
Why This Plugin Exists
Local image analysis is increasingly hardware-dependent. When a user loads a large TIFF or OME-Zarr, runs local SAM3, chat-assistant or another GPU-backed workflow, they often need to know:
- Is the GPU actually being used?
- Is VRAM full?
- Is system RAM becoming the bottleneck?
- Is napari healthy, lagging, or recently frozen?
- Is the CPU busy while the GPU is idle?
- Did a model finish, stall, or continue running in the background?
This plugin gives that signal directly inside napari without opening a separate system monitor. It also watches the Qt event loop so users can tell the difference between a busy machine and a napari UI that is becoming unresponsive.
Scope
napari-hardware-monitor is a hardware and responsiveness visibility plugin. It is not a profiler, model launcher, training manager, benchmark suite, or process attribution tool.
It is meant to sit beside tools such as:
napari-chat-assistant: local text assistant- segmentation and model plugins that consume CPU/GPU resources
The values are system-level. They tell users what the machine is doing, not which exact plugin or process caused the load.
GPU Support
NVIDIA GPU monitoring uses nvidia-smi.
If nvidia-smi is unavailable, the plugin still shows CPU and system memory and displays a clear no-GPU fallback. Multi-GPU systems are summarized as aggregate VRAM, maximum GPU utilization, maximum temperature, and total power draw.
Some platforms or drivers may report GPU activity but not VRAM totals. In that case the GPU memory card shows N/A rather than pretending the value is known.
Usage
Open napari and choose:
Plugins > Hardware Monitor
Controls:
Start: begin automatic polling.Pause: stop polling while keeping the last values visible.1s / 2s / 5s: choose refresh interval.2sis the default balance between responsiveness and overhead.Float: detach the monitor dock when the napari dock container supports it.Copy: copy a plain-text hardware and napari health snapshot.CPU cores: expand optional per-core CPU usage.
Installation
pip install napari-hardware-monitor
Development
git clone https://github.com/wulinteousa2-hash/napari-hardware-monitor.git
cd napari-hardware-monitor
pip install -e ".[test]"
pytest -q
napari
Design Notes
- Polling runs off the Qt UI thread so a slow
nvidia-smicall does not freeze the dock. - napari Health is measured on the Qt UI thread using event-loop delay. A large delay means napari was busy or recently unresponsive.
- The dashboard uses Qt painting directly and avoids heavy plotting dependencies.
- The dashboard keeps only a short in-memory history, so it stays lightweight during long napari sessions.
- Individual CPU cores are available as an optional detail panel, not as default dashboard clutter.
- The first release intentionally stays small: clear local hardware visibility is the core value.
Release Notes
1.0.0
Stable responsiveness release.
- Added napari Health card.
- Added Qt event-loop delay monitoring.
- Added readable health states: Healthy, Busy, Lagging, and Frozen recently.
- Added health hints for common bottlenecks.
- Added napari health details to copied snapshots.
0.1.0
Initial release.
- Added compact napari dock widget.
- Added CPU, RAM, GPU, and VRAM dashboard cards.
- Added gauge and sparkline visualizations.
- Added optional per-core CPU panel.
- Added asynchronous hardware polling.
- Added NVIDIA GPU support through
nvidia-smi. - Added multi-GPU summary behavior.
- Added dock float action, refresh control, pause/start, and copy snapshot.
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 napari_hardware_monitor-1.0.0.tar.gz.
File metadata
- Download URL: napari_hardware_monitor-1.0.0.tar.gz
- Upload date:
- Size: 81.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b96de5f6b7703dd40fad6642e394a427ad43b5845d1cb28df783f6cb2417496
|
|
| MD5 |
a2f97f34f4384d787991d01d234fa5a1
|
|
| BLAKE2b-256 |
6b99bcaee95471e37e9a58ad488ad0415c7b339e8c883c5de658007173b34530
|
File details
Details for the file napari_hardware_monitor-1.0.0-py3-none-any.whl.
File metadata
- Download URL: napari_hardware_monitor-1.0.0-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.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b94a4ec34ca8c02de58fa2b8f50b8976c4b1156928f5e43b9310090439dc0bb
|
|
| MD5 |
9134911b8a1102413c88fbf42c575071
|
|
| BLAKE2b-256 |
fa7eccf54731b71417fa0e5b1a1012666738242f4594d334cbd3568836ac68d0
|