Trackio Experiment Tracking for ML Training

VerifiedSafe

Log and visualize ML training metrics with Trackio, fire structured alerts, and retrieve them via CLI. Syncs to Hugging Face Spaces for real-time dashboards.

Sby Skills Guide Bot
Data & AIIntermediate
8/23/2026
Claude CodeCursorWindsurfCopilotCodex
#experiment-tracking#ml-training#metrics-logging#hugging-face#observability

Recommended for

Automated summary

Skill guiding use of Trackio, Hugging Face's library for logging, visualizing and querying ML training metrics, including alerts and syncing to HF Spaces.

Strengths

  • Covers all three interfaces (Python logging API, alerts API, retrieval CLI) with dedicated references
  • Explains why space_id matters for keeping metrics after a cloud instance terminates
  • Frames alerts as the primary mechanism for autonomous experiment iteration by an agent
  • Provides CLI commands with --json output suited to automation

Limitations

  • Detailed content lives in external reference files not included here
  • Assumes familiarity with ML training and the Hugging Face ecosystem
  • Does not address comparison or migration from other tracking tools
When to use it

Use it when writing or editing a Python training script that should log metrics, raise diagnostic alerts, or query runs through the Trackio CLI.

When not to use it

Avoid it if the project already relies on another experiment tracker such as W&B or MLflow and does not plan to adopt Trackio.

Security analysis

Safe
Quality score85/100

The skill describes using a Python library and CLI for ML experiment tracking, logging metrics, firing alerts, and syncing to Hugging Face Spaces. It does not instruct destructive, exfiltrating, or obfuscated actions. Network operations like webhooks and Space syncing are legitimate and explicitly scoped to the Trackio product. No dangerous shell commands or credential theft are present.

No concerns found

How this analysis is made

Examples

Add metric logging to a training script
Add Trackio logging to my train.py: initialize with project 'llm-finetune' and space_id 'myuser/trackio', log loss and learning rate each step, and call finish at the end.
Insert diagnostic alerts
Add trackio.alert() calls to my training loop that fire a WARN when loss spikes 3x over the running average and an ERROR when gradients contain NaN.
Query run metrics from the CLI
Show me how to use the trackio CLI to list runs in project 'my-project' and get the final loss and accuracy for run 'my-run' as JSON.

name: hugging-face-trackio description: Track and visualize ML training experiments with Trackio. Use when logging metrics during training (Python API), firing alerts for training diagnostics, or retrieving/analyzing logged metrics (CLI). Supports real-time dashboard visualization, alerts with webhooks, HF Space syncing, and... risk: unknown source: https://github.com/huggingface/skills/tree/main/skills/huggingface-trackio source_repo: huggingface/skills source_type: official date_added: 2026-07-01 license: Apache-2.0 license_source: https://github.com/huggingface/skills/blob/main/LICENSE

Trackio - Experiment Tracking for ML Training

Trackio is an experiment tracking library for logging and visualizing ML training metrics. It syncs to Hugging Face Spaces for real-time monitoring dashboards.

Three Interfaces

| Task | Interface | Reference | |------|-----------|-----------| | Logging metrics during training | Python API | references/logging_metrics.md | | Firing alerts for training diagnostics | Python API | references/alerts.md | | Retrieving metrics & alerts after/during training | CLI | references/retrieving_metrics.md |

When to Use Each

Python API → Logging

Use import trackio in your training scripts to log metrics:

  • Initialize tracking with trackio.init()
  • Log metrics with trackio.log() or use TRL's report_to="trackio"
  • Finalize with trackio.finish()

Key concept: For remote/cloud training, pass space_id — metrics sync to a Space dashboard so they persist after the instance terminates.

→ See references/logging_metrics.md for setup, TRL integration, and configuration options.

Python API → Alerts

Insert trackio.alert() calls in training code to flag important events — like inserting print statements for debugging, but structured and queryable:

  • trackio.alert(title="...", level=trackio.AlertLevel.WARN) — fire an alert
  • Three severity levels: INFO, WARN, ERROR
  • Alerts are printed to terminal, stored in the database, shown in the dashboard, and optionally sent to webhooks (Slack/Discord)

Key concept for LLM agents: Alerts are the primary mechanism for autonomous experiment iteration. An agent should insert alerts into training code for diagnostic conditions (loss spikes, NaN gradients, low accuracy, training stalls). Since alerts are printed to the terminal, an agent that is watching the training script's output will see them automatically. For background or detached runs, the agent can poll via CLI instead.

→ See references/alerts.md for the full alerts API, webhook setup, and autonomous agent workflows.

CLI → Retrieving

Use the trackio command to query logged metrics and alerts:

  • trackio list projects/runs/metrics — discover what's available
  • trackio get project/run/metric — retrieve summaries and values
  • trackio list alerts --project <name> --json — retrieve alerts
  • trackio show — launch the dashboard
  • trackio sync — sync to HF Space

Key concept: Add --json for programmatic output suitable for automation and LLM agents.

→ See references/retrieving_metrics.md for all commands, workflows, and JSON output formats.

Minimal Logging Setup

import trackio

trackio.init(project="my-project", space_id="username/trackio")
trackio.log({"loss": 0.1, "accuracy": 0.9})
trackio.log({"loss": 0.09, "accuracy": 0.91})
trackio.finish()

Minimal Retrieval

trackio list projects --json
trackio get metric --project my-project --run my-run --metric loss --json

Autonomous ML Experiment Workflow

When running experiments autonomously as an LLM agent, the recommended workflow is:

  1. Set up training with alerts — insert trackio.alert() calls for diagnostic conditions
  2. Launch training — run the script in the background
  3. Poll for alerts — use trackio list alerts --project <name> --json --since <timestamp> to check for new alerts
  4. Read metrics — use trackio get metric ... to inspect specific values
  5. Iterate — based on alerts and metrics, stop the run, adjust hyperparameters, and launch a new run
import trackio

trackio.init(project="my-project", config={"lr": 1e-4})

for step in range(num_steps):
    loss = train_step()
    trackio.log({"loss": loss, "step": step})

    if step > 100 and loss > 5.0:
        trackio.alert(
            title="Loss divergence",
            text=f"Loss {loss:.4f} still high after {step} steps",
            level=trackio.AlertLevel.ERROR,
        )
    if step > 0 and abs(loss) < 1e-8:
        trackio.alert(
            title="Vanishing loss",
            text="Loss near zero — possible gradient collapse",
            level=trackio.AlertLevel.WARN,
        )

trackio.finish()

Then poll from a separate terminal/process:

trackio list alerts --project my-project --json --since "2025-01-01T00:00:00"

Limitations

  • Use this skill only when the task clearly matches its upstream product or API scope.
  • Verify commands, API behavior, pricing, quotas, credentials, and deployment effects against current official documentation before making changes.
  • Do not treat generated examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/trackio-experiment-tracking-for-ml-training-mt59owvu/download' --output '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md.part' && mv '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md.part' '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && test -s '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/hugging-face-trackio' && cp -R '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu' '.claude/skills/hugging-face-trackio'

Cursor
test -f '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && test -s '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/hugging-face-trackio' && cp -R '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu' '.cursor/skills/hugging-face-trackio'

Codex
test -f '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && test -s '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/hugging-face-trackio' && cp -R '.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu' '.agents/skills/hugging-face-trackio'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu'

openskills read 'trackio-experiment-tracking-for-ml-training-mt59owvu'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/trackio-experiment-tracking-for-ml-training-mt59owvu/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills