trackio-rs
trackio-rs is the high-performance Rust client for Trackio, the open-source experiment tracker built by Hugging Face.
This SDK enables systems engineers and ML researchers to log metrics from high-concurrency, production-grade environments with the safety and speed of Rust.
Why trackio-rs?
While the Python client is ideal for research, trackio-rs is built for:
- Production Systems: Low-latency metric logging for live model monitoring.
- Thread Safety: Built on
parking_lotandreqwestfor safe concurrent logging. - Memory Efficiency: Minimal footprint for edge devices and high-throughput servers.
Quickstart
1. Set Up Your Dashboard
Deploy your Trackio Space on Hugging Face: Deploy Trackio Template
2. Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quickstart
1. Create a Trackio Dashboard Space
Create your dashboard Space: https://huggingface.co/new-space?sdk=gradio&template=gradio-templates%2Ftrackio-dashboard
Once deployed, the iframed Space URL will be something like:
https://username-trackio-dashboard.hf.space (you can find the iframed URL by clicking the triple dot menu next to Settings and then clicking "Embed this Space")
2. Log metrics
Set environment variables and run the example:
3. View in the Dashboard
Open your Space URL and select:
- Project:
rs-quickstart - Run:
rs-run-1
Open the "Metrics" tab to view your logged metrics.
Usage
use Client;
use json;
let client = new
.with_base_url
.with_project
.with_run;
client.log;
client.log;
client.flush?;
Environment Variables
| Variable | Description | Default |
|---|---|---|
TRACKIO_SERVER_URL |
Base Trackio server URL | http://127.0.0.1:7860 |
TRACKIO_PROJECT |
Project name | - |
TRACKIO_RUN |
Run name | - |
HF_TOKEN |
Hugging Face token with write access | - |