huggingface-trackio
What it does
This skill tracks the progress of machine learning training runs and shows it on a dashboard. It is for people training models who want to watch metrics and get warned about problems.
When to use it
- βWhen you want to log training metrics during a model run.
- βWhen you want an alert sent if training shows a problem.
- βWhen you want to retrieve or analyze logged metrics after training.
Skill link
https://github.com/huggingface/skills/blob/main/skills/huggingface-trackio/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βTrack my fine-tuning run's loss and accuracy, and send me an alert if the loss stops improving.β
5 new skills a week. 1 minute to read.
How it works
The AI adds Trackio logging to the training script, sends metrics to a live dashboard and can fire alerts with optional webhooks. The metrics can be read back later with the command line tool.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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'sreport_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. Auto-created Spaces are public by default β pass private=True if the metrics should not be public.
β 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 availabletrackio get project/run/metricβ retrieve summaries and valuestrackio list alerts --project <name> --jsonβ retrieve alertstrackio showβ launch the dashboardtrackio 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
# Spaces are PUBLIC by default (good for shareable dashboards);
# pass private=True if the metrics should not be public
trackio.init(project="my-project", space_id="username/trackio", private=True)
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:
- Set up training with alerts β insert
trackio.alert()calls for diagnostic conditions - Launch training β run the script in the background
- Poll for alerts β use
trackio list alerts --project <name> --json --since <timestamp>to check for new alerts - Read metrics β use
trackio get metric ...to inspect specific values - 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
FAQ
Will my training metrics be public?
Auto-created Spaces are public by default, but the skill can make them private if you ask.
Does it work for remote training?
Yes. Passing a Space ID syncs metrics to a dashboard that stays available after the training machine shuts down.
Can it work with TRL?
Yes. TRL can report to Trackio directly.
Details
Original description by the author
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 JSON output for automation.
repo: huggingface/skills
Popularity
- GitHub stars
- 11k
- Ranking position
- #11778
- License
- Apache-2.0
- Updated
- 10/30/2026
Comments
- β¦
More skills from this repository
hf-cli
11kHelps your agent use the Hugging Face command line tool to download, upload and manage models, datasets, Spaces, repos and the local cache.
hf-cloud-aws-context-discovery
11kHelps your agent find your AWS profile, region and account details before any cloud work, so it does not guess which account to use.
hf-cloud-python-env-setup
11kHelps your agent set up a clean Python environment with a suitable Python version and current libraries before running SageMaker or AWS automation.
hf-cloud-sagemaker-deployment-planner
11kHelps your agent plan how to deploy a model to Amazon SageMaker, choosing real-time, serverless, async or batch hosting with sensible defaults.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.