# Trackio

> Local-first experiment tracking that drops in for wandb

- Category: Training & Fine-Tuning / Experiment Tracking
- Language: Python
- Repository: https://github.com/gradio-app/trackio
- Website: https://huggingface.co/blog/trackio
- Canonical page: https://ai-tldr.dev/tools/trackio/

## In short

Trackio is a free experiment tracking library from Hugging Face for logging metrics, media, and tables from machine learning runs. It is local-first: the dashboard runs on your machine by default and logs are stored in a SQLite database, so you don't need to create an account to start tracking. It sits in the Experiment Tracking category of the Training & Fine-Tuning tools and is open-source, written in Python.

## Overview

Trackio is a free experiment tracking library from Hugging Face for logging metrics, media, and tables from machine learning runs. It is local-first: the dashboard runs on your machine by default and logs are stored in a SQLite database, so you don't need to create an account to start tracking.

Its API mirrors wandb. You can write `import trackio as wandb` and keep your existing `init`, `log`, and `finish` calls, which makes it a drop-in replacement for teams already using that logging style. A Gradio-inspired dashboard ships with it for viewing metrics and media.

As an experiment-tracking tool, Trackio fits both human and agent-driven workflows. Because runs live in SQLite, it includes a CLI for querying data (including read-only SQL), which is handy for LLM-driven analysis and high-throughput parallel experiments. You can optionally push runs to a free Hugging Face Space for collaboration.

## What it does

- API-compatible with wandb.init, wandb.log, and wandb.finish, so existing logging code works with `import trackio as wandb`
- Local-first by default: runs are stored in a SQLite database on your machine, no account required
- Built-in Gradio-inspired dashboard to view metrics, media, tables, and alerts
- CLI for programmatic access, including read-only SQL queries over your run data
- Cloud-optional: pass a space_id to log to a free Hugging Face Space for collaborative experiments
- Forkable design — Python backend and API with a Svelte 5 dashboard you can extend or replace

## Getting started

Trackio requires Python 3.10 or higher. Install it, log some metrics, then open the dashboard.

1. Install Trackio

   Install from PyPI with pip (or uv).

```bash
pip install trackio
```

2. Log metrics from your training loop

   Initialize a project, log metrics each step, and finish the run. The API matches wandb, so you can also write `import trackio as wandb`.

```python
import trackio

trackio.init(
    project="my-project",
    config={"epochs": 8, "learning_rate": 0.001, "batch_size": 64}
)

trackio.log({
    "train_loss": 0.42,
    "train_accuracy": 0.88,
})

trackio.finish()
```

3. Launch the dashboard

   View your runs locally in the browser. Pass a project name to open it directly.

```bash
trackio show --project "my-project"
```

## When to use it

- Track loss and accuracy across local training runs without signing up for a hosted service
- Migrate off wandb with minimal code changes by aliasing trackio as wandb
- Let LLMs or agents analyze experiment results by running read-only SQL queries over the SQLite store
- Push local runs to a free Hugging Face Space to share results with collaborators
