Skip to main content

Terminal UI for PyTorch Lightning CSVLogger metrics.

Project description

ltui

CI

Terminal UI for live and posthoc visualization of PyTorch Lightning CSVLogger metrics.

ltui is built for SSH and tmux workflows: no browser, no server process, no TensorBoard dependency. Point it at a log root and it recursively finds Lightning metrics.csv files, lets you switch runs and metrics from the keyboard, and renders a single focused terminal plot.

Features

  • Recursively discovers Lightning metrics.csv files in nested experiment folders
  • Live refresh for growing CSV files, with pause and manual rescan
  • Compare multiple runs in one plot
  • Groups train_ and val_ metric families by default
  • Step/epoch x-axis switching with integer ticks
  • Optional EMA smoothing and log scaling
  • Fuzzy selectors for runs, metrics, and YAML configs
  • Per-root UI state under ~/.local/state/ltui/

Installation

After the first PyPI release:

pip install ltui

From source

Create a dedicated micromamba environment and install the package editable:

git clone https://github.com/erik-ayari/ltui.git
cd ltui

micromamba create -n ltui python=3.11 -y
micromamba activate ltui
pip install -e ".[dev]"

This keeps runtime and development dependencies inside the ltui environment.

From any project directory

Activate the environment, then run ltui against the log root you want to inspect:

micromamba activate ltui
ltui /path/to/log/root

Optional shell helper:

ltui() {
  micromamba run -n ltui ltui "$@"
}

With that function in your shell config, ltui /path/to/log/root works from any directory without manually activating the environment.

Usage

ltui ./lightning_logs
ltui /data/experiments/my_model
ltui ~/runs/my_experiment

On startup, ltui selects the latest modified run and chooses a default loss metric when one is available.

Supported Log Layouts

ltui targets PyTorch Lightning CSVLogger output. Every discovered metrics.csv is treated as one selectable run/version.

Supported examples:

lightning_logs/version_0/metrics.csv
run_a/version_0/metrics.csv
run_a/lightning_logs/version_0/metrics.csv
experiments/group_1/run_a/lightning_logs/version_3/metrics.csv

Display names come from paths relative to the scanned root.

Keybindings

Key Action
m Open metric selector
r Open run/version selector
c Open config viewer for runs with a unique YAML config
/ Fuzzy search inside selector
arrow keys Navigate selector
space Toggle selection in selector, pause/resume on main screen
enter Apply selector
n Next selected metric/family
p Previous selected metric/family
a Toggle x-axis between step and epoch
d Toggle dark/light plot theme
s Toggle smoothing
x Toggle log-x
y Toggle log-y
R Force rescan
q Quit

Metric Handling

Metric columns are numeric columns except step and epoch. Rows with NaN for the selected metric are dropped, and points are sorted by x-axis before plotting.

Grouped mode is enabled by default. train_loss_step, train_loss_epoch, and val_loss appear as family loss; selecting loss plots whichever train/val sides exist. Use a to switch between step and epoch. On the step axis, validation epoch metrics use the step value from their CSV row, which places validation at the training step where it was logged.

Development

micromamba activate ltui
pytest
python -m build
twine check dist/*

The CLI entrypoint is:

ltui /path/to/log/root

Project details


Download files

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

Source Distribution

ltui-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

ltui-0.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file ltui-0.1.0.tar.gz.

File metadata

  • Download URL: ltui-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ltui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0ff59e397dbf5d94a219cb4ebf181aeae95e0b463f2044675b61a319e6c2e46
MD5 2ea774af4d34e07c9a41ea0975513978
BLAKE2b-256 4aadc2d45213fa770469559691087f55f7280e12cfa22f1cfd6434f732214520

See more details on using hashes here.

Provenance

The following attestation bundles were made for ltui-0.1.0.tar.gz:

Publisher: publish.yml on erik-ayari/ltui

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

File details

Details for the file ltui-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ltui-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ltui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 307f0adbb4491e4a09b4b81c376a57f5539318fbaf433ac5b76d35744908441d
MD5 c4aa13aac68bb46b58785b8b463106cf
BLAKE2b-256 4a0bcff9be12e503364e85e61f2e8802d3cdead725682a2322473f862aa8f0ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for ltui-0.1.0-py3-none-any.whl:

Publisher: publish.yml on erik-ayari/ltui

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