TensorBoard-like terminal monitor for PyTorch Lightning metrics, CSVLogger runs, and live run comparison.
Project description
ltui - terminal TensorBoard for PyTorch Lightning metrics
Monitor PyTorch Lightning training runs directly over SSH or inside tmux. No browser, no TensorBoard server, no port forwarding.
pipx install lightning-metrics-tui
ltui --demo
For your own Lightning logs:
ltui ./lightning_logs
Why ltui?
ltui is a TensorBoard-like terminal monitor for PyTorch Lightning metrics. It is built for remote training sessions where opening a browser, starting a TensorBoard server, or forwarding ports is friction.
Use it to inspect Lightning CSVLogger runs, compare versions, group train/validation metrics, smooth noisy curves, inspect run configs, and navigate everything from the terminal.
Quick start
pipx install lightning-metrics-tui
ltui --demo
For one-shot use without a persistent install:
pipx run --spec lightning-metrics-tui ltui --demo
The command remains ltui. The install package is lightning-metrics-tui, and the Python module remains ltui.
Try the demo
ltui --demo
The demo opens bundled Lightning-style CSVLogger logs with three versions, training and validation loss, accuracy, learning rate, and hparams.yaml files. The demo data is copied to a temporary directory before launch.
From a source checkout, the same example data is available at:
ltui examples/lightning_logs
Usage with existing Lightning logs
Point ltui at any directory containing Lightning logs:
ltui /path/to/log/root
Common examples:
ltui ./outputs
ltui ./lightning_logs
ltui /data/experiments/stage1
On startup, ltui recursively discovers supported run directories, selects the latest modified run by default, and chooses a loss metric when one is available. The preferred x-axis is step, then epoch, then row index. Press a to toggle between step and epoch mode.
Usage with PyTorch Lightning CSVLogger
Existing Lightning CSVLogger runs work without changing your training code. Every discovered metrics.csv is treated as one selectable run/version.
Supported layouts include:
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
For native metrics.csv files, train/validation grouping uses the standard prefixes:
train_
val_
Examples:
train_loss + val_loss -> loss
train_recon_loss + val_recon_loss -> recon_loss
train_kl + val_kl -> kl
Lightning step/epoch suffixes are handled as part of the same family, so train_loss_step, train_loss_epoch, and val_loss appear as loss.
Usage with LtuiLogger
LtuiLogger is an optional PyTorch Lightning logger for new runs. It writes a small manifest, one narrow CSV file per metric series, optional image folders, and hyperparameters as JSON.
Install the optional logger dependencies in your training environment:
python -m pip install "lightning-metrics-tui[logger]"
Use it with Lightning:
from lightning.pytorch import Trainer
from ltui.lightning import LtuiLogger
logger = LtuiLogger(
save_dir="outputs",
name="stage1",
)
trainer = Trainer(logger=logger)
Path-style metric names create a hierarchy in the metric selector and multiplot view:
self.log("train/loss/kl", train_kl)
self.log("val/loss/kl", val_kl)
self.log("train/loss/recon", train_recon)
self.log("val/loss/recon", val_recon)
The logger also accepts train_ and val_ style names with the default prefixes, so simple metric names like train_loss and val_loss remain grouped as loss.
Images can be logged with the same path-style hierarchy:
logger.log_image("train/recon/sample", image, step=global_step, epoch=current_epoch)
logger.experiment.add_image("val/recon/sample", image_tensor, global_step=global_step)
Press i in the TUI to choose an image stream. Image viewing launches feh when it is installed.
Features
- Live terminal monitoring for PyTorch Lightning runs
- Lightning
CSVLoggermetrics.csvcompatibility - Optional
LtuiLoggerfor structured metric and image logs - Train/validation metric grouping
- Grouped multiplot pages for sibling metrics
- Multi-run comparison with color-coded legends
- Step and epoch x-axis modes with Lightning-friendly validation alignment
- Log scaling and EMA smoothing
- YAML config inspection for runs with a unique config file
- Keyboard-first selectors with fuzzy search
Why use ltui instead of TensorBoard?
Use ltui when you:
- train on a remote machine over SSH
- work inside tmux
- do not want to forward ports
- want to inspect
CSVLogger-compatible metrics quickly - want terminal-native run comparison
- want a lightweight monitor without starting a TensorBoard server
TensorBoard is still the broader tool for full experiment dashboards, plugin views, embeddings, and richer browser-based inspection. ltui focuses on fast scalar metric monitoring in the terminal.
How is this different from generic terminal plotters?
Generic terminal plotters can display scalar data, TensorBoard logs, or CSV files. ltui is focused on PyTorch Lightning training workflows: Lightning-style log directories, CSVLogger-compatible metrics, train/validation metric grouping, run comparison, smoothing, config inspection, and terminal-native navigation.
Installation
Recommended CLI install:
pipx install lightning-metrics-tui
Normal pip install:
python -m pip install lightning-metrics-tui
Optional logger dependencies:
python -m pip install "lightning-metrics-tui[logger]"
The TUI itself does not require PyTorch Lightning.
Controls
| Key | Action |
|---|---|
r |
Open run/version selector |
c |
Open config viewer for runs with a unique YAML config |
m |
Open metric selector |
i |
Open image selector and launch feh for the selected image stream |
/ |
Fuzzy search inside selector |
arrow keys |
Navigate selector or selected plot in multiplot mode; left/right jump between models in run/config selectors |
space |
Toggle selection in selector, open multiplot on main screen |
enter |
Apply selector, focus selected plot in multiplot mode |
escape |
Clear plot selection in multiplot mode |
n |
Next selected metric/family, or next page in multiplot mode |
p |
Previous selected metric/family, or previous page in multiplot mode |
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 |
q |
Quit |
Development
python -m pip install -e ".[dev]"
pytest
python -m build
Changelog / release notes
See CHANGELOG.md.
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 lightning_metrics_tui-0.2.0.tar.gz.
File metadata
- Download URL: lightning_metrics_tui-0.2.0.tar.gz
- Upload date:
- Size: 518.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
816587cb98d7c79e16b0978f3d52c025ee09f38dbffef8421bcd4485e1e5c951
|
|
| MD5 |
71216bacb79e1a15224fe704d5d64490
|
|
| BLAKE2b-256 |
caf40a9cb491e796fe35701b981f207e041a0953e7e4fceb9b2b35db4675ea8f
|
Provenance
The following attestation bundles were made for lightning_metrics_tui-0.2.0.tar.gz:
Publisher:
publish.yml on erik-ayari/ltui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lightning_metrics_tui-0.2.0.tar.gz -
Subject digest:
816587cb98d7c79e16b0978f3d52c025ee09f38dbffef8421bcd4485e1e5c951 - Sigstore transparency entry: 1681162196
- Sigstore integration time:
-
Permalink:
erik-ayari/ltui@02e72afc1b96f53e44c0c3c0f6e6d4d0e4f6591a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/erik-ayari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02e72afc1b96f53e44c0c3c0f6e6d4d0e4f6591a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file lightning_metrics_tui-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lightning_metrics_tui-0.2.0-py3-none-any.whl
- Upload date:
- Size: 36.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04541f3e87622d2509553a3592223581bf267204f97a5534f0efa4141e5c8109
|
|
| MD5 |
c5135670b45e1891ec4a19786352b7d2
|
|
| BLAKE2b-256 |
1c38ae45b748c4bb035e7935532f620b50d5f4beea5d17c4969644186b57fae0
|
Provenance
The following attestation bundles were made for lightning_metrics_tui-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on erik-ayari/ltui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lightning_metrics_tui-0.2.0-py3-none-any.whl -
Subject digest:
04541f3e87622d2509553a3592223581bf267204f97a5534f0efa4141e5c8109 - Sigstore transparency entry: 1681162681
- Sigstore integration time:
-
Permalink:
erik-ayari/ltui@02e72afc1b96f53e44c0c3c0f6e6d4d0e4f6591a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/erik-ayari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02e72afc1b96f53e44c0c3c0f6e6d4d0e4f6591a -
Trigger Event:
workflow_dispatch
-
Statement type: