mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-10-23 08:07:34 -06:00
[PR #224] [MERGED] feat(examples): enrich the colored monitor and support uv run from a URL #223
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/nvitop#223
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/XuehaiPan/nvitop/pull/224
Author: @XuehaiPan
Created: 7/10/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @XuehaiPan
Base:
main← Head:feat/examples-improvements📝 Commits (2)
ce3c935feat(examples/monitor-colored): add host summary and two-column panel6bd544ffeat(examples): run scripts viauvfrom a URL without a clone (PEP 723)📊 Changes
17 files changed (+238 additions, -33 deletions)
View changed files
📝
docs/source/spelling_wordlist.txt(+2 -0)📝
examples/collector-background/README.md(+6 -0)📝
examples/collector-background/collector_background.py(+11 -1)📝
examples/collector-csv/README.md(+6 -0)📝
examples/collector-csv/collector_csv.py(+11 -1)📝
examples/collector-tensorboard/README.md(+6 -0)📝
examples/collector-tensorboard/collector_tensorboard.py(+11 -1)📝
examples/monitor-colored/README.md(+13 -4)📝
examples/monitor-colored/monitor_colored.py(+102 -18)📝
examples/monitor-minimal/README.md(+6 -0)📝
examples/monitor-minimal/monitor_minimal.py(+15 -6)📝
examples/monitor-web/README.md(+6 -0)📝
examples/monitor-web/monitor_web.py(+9 -0)📝
examples/select-devices-api/README.md(+6 -0)📝
examples/select-devices-api/select_devices_api.py(+11 -1)📝
examples/take-snapshots/README.md(+6 -0)📝
examples/take-snapshots/take_snapshots_demo.py(+11 -1)📄 Description
Issue Type
Runtime Environment
Examples and tooling change; validated in these environments:
3.12.3nvitopversion or commit:feat/examples-improvements(this branch)en_US.UTF-8Description
Two improvements to
examples/, split into two commits.Enrich the colored monitor (
monitor-colored):[Host]: CPU / memory / swap / load) vianvitop.host.[CUDA/NVML]and total-memory tags.GMBW%) column.monitor-minimaland drop its redundant total-memory line.Run scripts via
uvfrom a URL, no clone (all runnable examples):Add PEP 723 inline metadata (
requires-python+dependencies) to the 8 runnable examples, so each runs straight from its URL:Each script's docstring and README now shows the
uv runinvocation. For the collector examples this replaces thepip install -r requirements.txt+python3 …steps with a single command.ml-framework-callbacksareCallbackclasses with no entry point, so they are left untouched.Add
uvandtensorboardto the spelling wordlist.Motivation and Context
Closes #221 — the
monitor-coloredexample now surfacesSM ClockandMemory Clockon dedicated rows that are never truncated, providing the always-visible clock readout that issue asked for. ThenvitopTUI's width-based truncation is intentional and left unchanged; this gives users a clock-visible alternative.uv runsupport lets anyone try an example with a single command and zero setup — no clone, and no manualpip installfor the examples that need extra dependencies.Testing
pre-commitpasses on all changed files (ruff, ruff-format, mypy, pylint, codespell).python3 -m py_compile.monitor-coloredrendered against mock devices (H100 + GB10 withN/Afields, 7-digit PIDs, >100% CPU) and on a real 4×H100 host.examples/changed (plus two spelling-wordlist entries).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.