Skip to main content

A terminal UI for monitoring neural network training in real time

Project description

gradtop

A terminal UI for monitoring neural network training in real time. Inspired by htop.

What it shows

  • Loss curve over training steps
  • Per-layer update/data ratio (log10 scale) — the ratio of gradient updates to weight magnitudes, following Karpathy's diagnostic from the Neural Networks: Zero to Hero series. Values should hover around -3. Above -2 means large updates, below -4 means vanishing gradients.

Installation

pip install gradtop

Development

If you want to build from source, you need Rust and maturin:

git clone https://github.com/yourname/gradtop
cd gradtop
pip install maturin
maturin develop

Usage

import gradtop
from gradtop import gradtop

# wrap your training loop
with GradTop(model, optimizer, every_n_steps=10) as monitor:
    for epoch in range(epochs):
        for data, target in train_loader:
            optimizer.zero_grad()
            output = model(data)
            loss = criterion(output, target)
            loss.backward()
            optimizer.step()
            monitor.tick(loss.item())

Press any key to close the TUI. The terminal is restored automatically on exit.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gradtop-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (554.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

gradtop-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (543.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

gradtop-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (491.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file gradtop-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gradtop-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cae302fcfdd9f445337d13267a3f67fe1192dffb84f9df48232d561abed0f799
MD5 00d17bcf58110669211ab1bb56c156f6
BLAKE2b-256 fc8b9b58ea88f20f24cd01557a4568566ddd969f044f7ecc7b837234321444f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradtop-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on NavneetKanna/gradtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gradtop-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gradtop-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0d2453a5f6b5c511f95f79ab1f08f6dfab7a35baafbd42f6634f8a5411503f3f
MD5 acc4d242c4faa5a0ea60c2e5dcbfc727
BLAKE2b-256 821fcfc9914cb46f034364d9067cc5806cdada8d9052c5f71446d104a1a3ee29

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradtop-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on NavneetKanna/gradtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gradtop-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gradtop-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 651cf415d8c9ebba6a73afd01dc5fd2e75b8fcdc93b1139b2dba034fc27e6cb1
MD5 19dc8dbb118584dd643a1c7a4fd465f0
BLAKE2b-256 f2737ecf929e6f495d7638b1e12d340592c951b94893869695111483e0463d95

See more details on using hashes here.

Provenance

The following attestation bundles were made for gradtop-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on NavneetKanna/gradtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page