Skip to main content

whirr

License: MIT Python 3.9+ Tests

Local experiment orchestration. Queue jobs, track metrics, wake up to results.

whirr is a lightweight, self-hosted alternative to experiment tracking tools. No cloud, no accounts, no external dependencies - just SQLite and your filesystem.

Features

  • Job Queue - Submit experiments, run them on workers
  • Metric Tracking - Log metrics from Python, store as append-only JSONL
  • Multi-GPU Support - One worker per GPU, automatic device assignment
  • Process Safety - Orphan prevention with PDEATHSIG, graceful shutdown
  • Concurrent Access - SQLite WAL mode for safe multi-process access
  • Web Dashboard - Interactive UI for viewing runs and comparing metrics
  • Reproducibility - Automatic capture of git commit and pip freeze
  • Server Mode - Multi-machine orchestration with PostgreSQL backend

Installation

pip install whirr

Optional dependencies:

# For dashboard
pip install whirr[dashboard]

# For server mode (PostgreSQL, HTTP API)
pip install whirr[server]

# For all features
pip install whirr[all]

Or install from source:

git clone https://github.com/syntropy-systems-oss/whirr.git
cd whirr
pip install -e ".[all]"

Quick Start

Initialize a Project

cd your-ml-project
whirr init

This creates a .whirr/ directory with the database and configuration.

Submit Jobs

# Submit a training job
whirr submit --name baseline -- python train.py --lr 0.01

# With tags for organization
whirr submit --name sweep-lr-001 --tags sweep,lr -- python train.py --lr 0.001

Start Workers

# Start a worker (claims and runs jobs from the queue)
whirr worker

# For multi-GPU, start one worker per GPU
CUDA_VISIBLE_DEVICES=0 whirr worker --device 0 &
CUDA_VISIBLE_DEVICES=1 whirr worker --device 1 &

Monitor Progress

# View active jobs
whirr status

# View specific job details
whirr status 1

# Follow job logs
whirr logs 1 --follow

# List completed runs
whirr runs

Cancel Jobs

# Cancel a specific job
whirr cancel 1

# Cancel all queued jobs
whirr cancel --all-queued

Python Library

Track metrics directly from your training scripts:

import whirr

# Initialize a run
run = whirr.init(
    name="my-experiment",
    config={"lr": 0.01, "batch_size": 32},
    tags=["baseline"]
)

# Log metrics during training
for epoch in range(100):
    loss = train_epoch()
    run.log({"loss": loss, "epoch": epoch}, step=epoch)

# Save summary metrics
run.summary({"best_loss": 0.1, "best_epoch": 42})

# Save artifacts
run.save_artifact("model.pt", "best_model.pt")

run.finish()

Or use as a context manager:

with whirr.init(name="my-run") as run:
    run.log({"loss": 0.5})
    # Automatically marked complete or failed

Direct Runs (No Queue)

You can use whirr for tracking without the job queue:

python train.py  # Uses whirr.init() directly
whirr runs       # Shows the run

Server Mode (Multi-Machine)

For distributed setups with multiple GPU machines. See the full setup guide for detailed instructions.

Quick Setup

1. Start the server (on head node):

# Create .env file with configuration
cat > .env << EOF
POSTGRES_PASSWORD=$(openssl rand -base64 32)
WHIRR_DATA_DIR=/srv/whirr
EOF

# Start PostgreSQL + whirr server
docker compose up -d

2. Install workers (on GPU nodes):

# Download the Rust worker (recommended - only ~2MB, ~10MB RAM)
curl -L https://github.com/syntropy-systems-oss/whirr/releases/latest/download/whirr-worker-linux-x86_64 \
  -o /usr/local/bin/whirr-worker
chmod +x /usr/local/bin/whirr-worker

# Or use the Python worker
pip install whirr[server]

3. Start workers:

# Rust worker
whirr-worker --server http://head-node:8080 --data-dir /mnt/shared/whirr --gpu 0

# Or Python worker
whirr worker --server http://head-node:8080 --data-dir /mnt/shared/whirr --gpu 0

4. Submit jobs:

whirr submit --server http://head-node:8080 -- python train.py --lr 0.01

Project Structure

your-project/
├── .whirr/
│   ├── config.yaml      # Project configuration
│   ├── whirr.db         # SQLite database (WAL mode)
│   └── runs/
│       └── run-id/
│           ├── meta.json       # Run metadata
│           ├── config.json     # Run configuration
│           ├── metrics.jsonl   # Logged metrics
│           ├── output.log      # stdout/stderr
│           └── artifacts/      # Saved files

CLI Reference

Command Description
whirr init Initialize whirr in current directory
whirr submit -- CMD Submit a job to the queue
whirr status [ID] Show job status
whirr worker Start a worker process
whirr logs ID View job output
whirr cancel ID Cancel a job
whirr runs List all runs
whirr dashboard Launch web dashboard
whirr compare ID1 ID2 Compare runs side-by-side
whirr export ID Export run data
whirr server Start multi-machine server
whirr doctor Diagnose configuration issues

Documentation

Full documentation is available in the docs/ directory:

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run specific test file
pytest tests/test_db.py -v

License

MIT License - see LICENSE for details.

Metadata

Release files for whirr 0.5.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 whirr 0.5.3
File Size Uploaded Provenance
whirr-0.5.3.tar.gz 171.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 262.5 kB

Release files / whirr-0.5.3.tar.gz

Download URL whirr-0.5.3.tar.gz
Size 171.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c3f1150c08579259a9ed0ae8e39e0d9bd9835c50ad0e6ad1e71ff55db95fa62e
BLAKE2b-256 checksum
How to use checksums
3688fca128ce73397ec5dd5cd43f415dd31f744c2b117f88222b8c9a3f4ca39f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 16, 2026.

Transparency log

Release files / whirr-0.5.3-py3-none-any.whl

Download URL whirr-0.5.3-py3-none-any.whl
Size 90.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3851a32b9a611dcb590057072beddaa6edcfe0914bb0e22112dd19b89ccc092f
BLAKE2b-256 checksum
How to use checksums
c7dc1048123791bb04ee0034a3f6ce3881f34d8ae670c2d3d09e176bc9c9b15c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 16, 2026.

Transparency log

Security for whirr 0.5.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for whirr-0.5.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 Jan 16, 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.

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