gradio-app/trackio
A lightweight, local-first, and free experiment tracking library from Hugging Face 🤗
Trackio – lightweight, free experiment‑tracking for humans and AI agents
What it is – Trackio is a Python library (with a Svelte‑based web UI) that lets you log the metrics, configs, artefacts and alerts of machine‑learning runs. It stores everything locally in a SQLite database (optionally frozen to Parquet) and can serve a dashboard on your machine or publish it to a free Hugging Face Space. The API is deliberately compatible with the popular wandb client, so you can drop‑in replace import wandb with import trackio as wandb.
Core features
- Local‑first, cloud‑optional – logs stay on your disk by default; you can later sync to a Hugging Face Space for sharing.
- SQLite storage + Parquet export – fast, high‑throughput writes via an in‑memory queue that flushes every 0.5 s.
- CLI & SQL querying –
trackio query … --sql "SELECT …"lets LLM‑driven agents read data directly. - WandB‑compatible API –
trackio.init,trackio.log,trackio.finishwork as a drop‑in replacement. - Dashboard – a Gradio‑styled UI (launch with
trackio show) displays metrics, media, tables, alerts and can be embedded via an iframe. - Alerts & webhooks – send Slack/Discord/any‑URL notifications on custom conditions.
- Free for unlimited personal/team use – no paid tier required.
- Self‑hostable – run the backend/API on any server and point clients to it with
TRACKIO_SERVER_URL.
Quick start
pip install trackio # Python 3.10+
import trackio, random, time
trackio.init(project="demo", config={"epochs":5})
for epoch in range(5):
trackio.log({"epoch": epoch,
"loss": random.random(),
"acc": random.random()})
time.sleep(0.1)
trackio.finish()
Run trackio show (or trackio.show() in code) to open the dashboard.
Cloud & sharing
- Hugging Face Spaces – pass
space_id="user/space"totrackio.initand the library will automatically create or use a Space, handling authentication viahuggingface-cli. - Sync –
trackio.sync(project="my", space_id="user/space")uploads a local SQLite DB to a Space for collaborative viewing. - Embedding – use an iframe with query parameters (
project=…,metrics=…,theme=dark, etc.) to embed a live dashboard in blogs or docs.
Performance
- Non‑blocking
log()calls; a background thread batches writes. - Local logging: effectively unlimited throughput (thousands of calls per second).
- Space logging: ~2 k logs in < 8 s for a single run; ~32 k logs in ~14 s when 32 parallel threads are used (free‑tier Space hardware).
Development & extensibility
- Backend written in pure Python; UI in Svelte 5 under
trackio/frontend/. - Fork‑friendly: replace the frontend directory, rebuild, and the same API is served.
- Documentation: https://huggingface.co/docs/trackio
- License: MIT.
Who might use it?
- Researchers who want a zero‑cost, offline‑first tracker.
- LLM‑driven agents that need to log and later query experiment data via CLI/SQL.
- Teams that prefer self‑hosting or Hugging Face Spaces over commercial services like Weights & Biases.
Pronunciation: TRACK‑yo ("track yo' experiments").
Related
- Dispatch
- Project
- Project
- Project
- Project