Skip to main content

Stormlog

Memory and performance profiling for ML training and inference

| Documentation | Usage guide | Inference profiling | Terminal UI | PyPI |

CI PyPI version Documentation Python 3.10–3.15 License: MIT


About

Stormlog measures what a model does to the hardware it runs on, and keeps the evidence. It works the same way for a training job's memory and for an inference server's latency: capture once, save an artifact, then analyze, compare and diagnose it from the CLI, Python or a terminal UI.

Training and memory

  • Track allocated, reserved and device memory over time for PyTorch (CUDA, ROCm, Apple MPS and CPU), TensorFlow, JAX, and MLX on Apple Silicon.
  • Catch growth before it becomes an OOM: alert thresholds, growth and gap analysis, and an OOM flight recorder that keeps the moments before a crash.
  • Reconstruct long captures by session, and compare ranks of a distributed run to find the one that diverged.
  • Write diagnose bundles with a fixed exit-code and report contract for CI and release gates, and log to W&B or MLflow.

Inference serving

  • Profile any OpenAI-compatible endpoint: time to first token, time per output token, end-to-end latency, throughput, failures and tokens, under closed-loop, fixed-rate, Poisson, burst or replayed traffic.
  • Judge each run against an SLO with goodput, and compare a baseline with a candidate over repeated runs (stormlog infer compare), so a change is shown to help instead of assumed to.
  • Explain slow windows (stormlog infer diagnose): queue saturation, KV preemption, prefix-cache loss, client admission and workload changes, each finding citing the records behind it.
  • Go deeper on vLLM: its Prometheus metrics, an execution hook that records scheduler steps, and GPU profiler traces joined to the requests they served.
  • Watch a live server and capture its incidents (stormlog infer watch), and export Prometheus metrics and OTLP spans.

Supported runtimes

Area Supported
Training memory PyTorch (CUDA, ROCm, MPS, CPU), TensorFlow, JAX, MLX on Apple Silicon
Inference serving vLLM (metrics, execution hook, profiler traces), any OpenAI-compatible server, MLX-LM, oMLX, MLX-Audio
Interfaces Python API, gpumemprof / tfmemprof / jaxmemprof / mlxmemprof, stormlog infer, stormlog query, terminal UI
Python 3.10 to 3.15

Getting started

pip install stormlog                 # core, inference profiling and the CLIs
pip install "stormlog[tui,torch]"    # terminal UI with PyTorch

Other extras: torch, tf, jax, mlx (Apple Silicon), viz, infer-tokenizers, infer-otlp, wandb, mlflow, and all. The examples/ package and the scenario scripts are source-checkout only: clone the repository and pip install -e . to run them.

Training memory

gpumemprof info                      # tfmemprof info, jaxmemprof info, mlxmemprof info
gpumemprof track --duration 30 --interval 0.5 --output track.json --format json
gpumemprof analyze track.json --format txt --output analysis.txt
gpumemprof diagnose --duration 0 --output diag/
stormlog                             # the terminal UI
import torch
from stormlog import GPUMemoryProfiler  # CUDA or ROCm; MemoryTracker also covers MPS

profiler = GPUMemoryProfiler()
model = torch.nn.Linear(1024, 128).to(profiler.device)


def train_step() -> torch.Tensor:
    return model(torch.randn(64, 1024, device=profiler.device)).sum()


profiler.profile_function(train_step)
print(f"Peak: {profiler.get_summary()['peak_memory_usage'] / 1024**2:.1f} MB")

Stormlog's terminal UI after ResNet-18 trained on CIFAR-10: the memory timeline, its markers, and the first anomaly attributed to epoch 1 / train
The terminal UI after ResNet-18 trained on CIFAR-10 for six epochs on an NVIDIA L4 (87.8% test accuracy): the memory timeline with its markers, and the first anomaly attributed to epoch 1 / train.

Inference

stormlog infer profile \
  --base-url http://localhost:8000/v1 --model Qwen/Qwen2.5-7B-Instruct \
  --concurrency 1,8,32 --duration 60 --slo ttft:500 --vllm-metrics \
  --output run.jsonl
stormlog infer analyze run.jsonl     # latency, throughput, goodput per case
stormlog infer diagnose run.jsonl    # why slow windows were slow
stormlog infer compare --baseline base-*.jsonl --candidate cand-*.jsonl \
  --gate 'client.e2e.p95=non-inferiority:0.05'

stormlog infer diagnose explaining a queue saturation incident with its evidence
An excerpt of stormlog infer diagnose on vLLM 0.30.0 serving Qwen3-0.6B on an NVIDIA L4, overloaded for 12 seconds.

Documentation

Contributing

Contributions are welcome. See the contributing guide and the code of conduct.

License

MIT

Metadata

Release files for stormlog 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stormlog 0.4.3
File Size Uploaded Provenance Actions
stormlog-0.4.3.tar.gz 4.0 MB With provenance Details for stormlog-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stormlog 0.4.3
File Interpreter ABI Platform Actions
stormlog-0.4.3-py3-none-any.whl Python 3 none any Details for stormlog-0.4.3-py3-none-any.whl

Total release size: 5.2 MB

Release files / stormlog-0.4.3.tar.gz

Download URL stormlog-0.4.3.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
63406a53bd98c066e35988f01af772e6e2e0fcd449606a79fbfcde5fa1915a34
BLAKE2b-256 checksum
How to use checksums
a45255a6f3e2622a0fa399557e059ab972525b9e37bf84d674e29dab3e041e32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / stormlog-0.4.3-py3-none-any.whl

Download URL stormlog-0.4.3-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9d54afd63ccd00fe68063fea91de862ec35f12a218b1ce8b67b137a53a0523c5
BLAKE2b-256 checksum
How to use checksums
a715f02a0d4c12021d74fca47091765f91ef2a4f77307378d5740313e378b406
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for stormlog 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stormlog-0.4.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page