Skip to main content

A lightweight local-first ML experiment tracker

Project description

TrackIt

A lightweight, local-first ML experiment tracker. No servers, no accounts, no configuration.

TrackIt is a simpler alternative to MLflow and Weights & Biases for tracking experiments during local development.


Features

  • Zero configuration — install and start tracking in 30 seconds
  • Local-first — all data stored in a single SQLite file
  • No accounts — no remote server, no sign-up
  • Experiment SDK — log params and metrics with a clean Python API
  • CLI — list experiments, find best runs, launch a dashboard
  • Web dashboard — interactive HTMX + Chart.js UI for exploring results

Installation

pip install trackit

For development:

pip install trackit[dev]

Quick Start

Log an experiment

from trackit import Experiment

exp = Experiment()

exp.log_param("lr", 0.001)
exp.log_param("batch_size", 32)

exp.log_metric("accuracy", 0.94)
exp.log_metric("loss", 0.12)

exp.finish()

Use as a context manager

from trackit import Experiment

with Experiment(name="resnet50-augmented") as exp:
    exp.log_param("lr", 0.001)
    for epoch in range(10):
        exp.log_metric("accuracy", evaluate(epoch))
        exp.log_metric("loss", compute_loss(epoch))

CLI

List experiments

trackit list

Output:

┌─────────────────────────────────────────────────────────────────┐
│                        Experiments                              │
├────┬──────────────────┬──────────┬───────────────────┬────────┬─────────┤
│ ID │ Name             │ Status   │ Created           │ Params │ Metrics │
├────┼──────────────────┼──────────┼───────────────────┼────────┼─────────┤
│  1 │ baseline         │ finished │ 2025-01-15 10:30  │      2 │       4 │
│  2 │ tuned            │ finished │ 2025-01-15 11:00  │      2 │       4 │
└────┴──────────────────┴──────────┴───────────────────┴────────┴─────────┘

Find the best run

trackit best accuracy

To minimize (e.g. loss):

trackit best loss --minimize

Launch the web dashboard

trackit ui

Open http://localhost:8042 in your browser.


Storage

All experiment data is stored in a single SQLite database at:

.trackit/experiments.db

This file lives in your project root. Add it to .gitignore if you don't want to commit experiment history.


Dashboard

The web dashboard provides:

  • Experiment list with status, param count, and metric count
  • Click-to-detail view showing all params and metrics
  • Chart.js visualizations for accuracy and loss curves
  • "Find Best Run" lookup for any metric

API Reference

Experiment

Experiment(name: str | None = None, db_path: str | None = None)
Method Description
log_param(key, value) Log a named parameter (stored as string)
log_metric(key, value, step=None) Log a named metric; step auto-increments per key
finish() Mark the experiment as finished

Experiment also supports with statement for automatic finish on exit.


Development

git clone <repo>
cd trackit
pip install -e ".[dev]"
pytest

License

MIT

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

trackit_train-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

trackit_train-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trackit_train-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for trackit_train-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9cb7fabfbc21f76f563aa04ec4bbe414d63bf82b6d4de51327f5c2d48de0227a
MD5 a81d1899deb0fd4e3cbfe14e9424e920
BLAKE2b-256 1e626a15e50232748d8355a31cdd5facf693cf28389b796f3b997adb5f71ca4f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trackit_train-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for trackit_train-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23e640326183ad0439800822b5d823cb8c328604b32648ed4c1b8b31822970ab
MD5 a732860de727ca00377c9e16037b7cc6
BLAKE2b-256 d5548b043f3fcb44469cf0d36e945c6713d70c9749bfafe912bf202afbf16c62

See more details on using hashes here.

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