TL;DR: Trackio is a new, open source, free experimental tracking Python library that offers local dashboards and seamless integrations that embrace facespaces for easy sharing and collaboration. Trackio is a drop-in exchange for WandB, so you can start with the syntax you already know!
background
If you train your own machine learning model, you know how important it is to track metrics, parameters, and hyperparameters during training and then visualize them to better understand the training run.
Most machine learning researchers do this using specific experimental tracking libraries. However, these libraries can either require payment, complex setups, or lack the flexibility needed for quick experimentation and sharing.
Why did you switch to Trackio?
At Hugging Face, the science team began using Trackio for their research projects. There are several important advantages over other tracking solutions.
Easy sharing and embedding: Trackio makes it very easy to share your training progress directly into blog posts and documents using IFRAME, or embed plots directly. This is especially valuable when you want to showcase a specific training curve or metric without requiring others to set up an account or navigate complex dashboards.
Standardization and Transparency: Metrics such as GPU energy usage are important for tracking and sharing with the community, allowing you to get better ideas about the energy demand and environmental impact of model training. Get information directly from NVIDIA-SMI commands with Trackio, which allows you to quantify and compare energy usage and add it to your model card.
Data Accessibility: Unlike tracking tools that lock data behind its own API, Trackio makes it easy to extract and analyze recorded data. This is extremely important for researchers who need to perform custom analysis or integrate training metrics into their research workflows.
Experimental Flexibility: Trackio’s lightweight design makes it easy to experiment with new tracking features during training. For example, you can determine when the tensor is moved from the GPU to the CPU when logging it during training. This greatly improves training throughput when you need to track the model/intermediate state without affecting performance.
Use Trackio
So, what is Trackio? How do you use it? Trackio is an open source Python library that allows you to track any metric and visualize them using a local gradient dashboard. You can also sync this dashboard to hug the face space. This means you can share your dashboard with other users simply by sharing the URL. As spaces can be private or public, this means that dashboards can be shared within members of the facial organization that are publicly or hugging.
install
You can install Trackio using PIP.
PIP Install Trackio
Or if you prefer to use UV:
UV PIP Installation Truck
Usage
Trackio is designed to be a drop-in exchange for experimental tracking libraries such as WandB. The API is compatible with wandb.init, wandb.log, wandb.finish, so you can import tracio as a wandb into your code.
-Import the wandb
+ Import tracio as wandb
Here is an example:
Import Trackio
Import random
Import Time execution = 3
Epoch = 8
def simulate_multiple_runs():
for run in range(run): trackio.init(project=“Fake Training”,config = {
“epoch”:epoch,
“Learning_rate”: 0.001,
“batch_size”: 64
})
for epoch in range(Epoch): train_loss = random.uniform(0.2, 1.0)train_acc = random.uniform(0.6, 0.95)val_loss = train_loss -random.unifigr (0.01, 0.1)val_acc = train_acc + random.uniform(0.01, 0.05)trackio.log({
“epoch”:epoch,
“train_loss”:train_loss,
“Train_Accuracy”:train_acc,
“val_loss”:val_loss,
“Val_Accuracy”:val_acc}) time.sleep(0.2)trackio.finish()simulate_multiple_runs()
Visualize the results
After recording your experiment, you can launch the dashboard to visualize the results. Run the following command on the terminal:
Truck Show
Or launching from Python:
Import Trackio Trackio.show()
You can also specify the project name.
Trackio Show -Project “My Project”
Or in Python:
trackio.show(project=“My Project”))
Space and sharing
To sync your local dashboard to hug your facespace, simply pass the space_id to init.
trackio.init(project=“Fake Training”,space_id =“org_name/space_name”))
If you’re hosting a dashboard with a space, you can simply share the URL or embed it anywhere using an iframe.
iframe SRC=“https://org_name-space_name.hf.space/?project=fake-training&metrics=train_loss, train_accuracy&sidebar=hidden” width=600 height=600 Frame border=“0”>iframe>
As spaces can be private or public, this means that dashboards can be shared within members of the public or hugging facial organization.
When you sync your track dashboard with your facespace and hug it, your data is logged in a temporary SQLite database of spaces. This database is reset when the space restarts, so Trackio converts the SQLite database to a Parquet Dataset and backs it up to a face dataset that hugs every 5 minutes. This means that you can visualize metrics recorded on a face dataset that you’re hugging easily at any time.
Tip: You can set the name of this dataset by passing it dataset_id to trackio.init().
🤗 Integrated with transformers and accelerated
Trackio natively integrates and accelerates face libraries such as transformers, allowing you to record metrics with minimal setup.
Using Transformers.Trainer:
Import numpy As np
from Dataset Import Dataset
from transformer Import Trainer, automodelforcausallm, Trainingarguments data = np.random.randint (0, 1000(8192, 64). tolist() dataset = dataset.from_dict({{“input_ids”: data, “label”:data}) trainer = trainer (model = automodelforcausallm.from_pretrained (“Qwen/qwen3-0.6b”), args = trainingarguments(run_name =“Fake Training”,Report_to =“track”), train_dataset = dataset, )trainer.train()
With acceleration:
from It will accelerate Import Accelerator Accelerator = accelerator(log_with =“track”)accelerator.init_trackers(“Fake Training”))
for Steps, Batch in I’ll list it(dataloader): … accelerator.log({“Training_loss”: loss}, step = step)accelerator.end_training()
No additional setup is required. Plugin to start tracking.
Design principles
The API is compatible with popular experimental tracking libraries and seamlessly migrates both Trackio. Local First: Logs and dashboards run and persist locally by default, using the option to hug facespaces. Lightweight and scalable: The core codebase is below 1,000 lines of Python, making it easier to understand and modify. Free and open source: All features including a hugging face host are free. Built on top of datasets and spaces for robust data processing and visualization.
Next Steps
Trackio is intentionally lightweight and is currently in beta. Some features found in other tracking tools, such as artifact management and complex visualization, are still unavailable. If you would like these features, please create an issue at https://github.com/gradio-app/trackio/issues.
Given the lightweight, open source nature of Trackio, we would like to work with the Machine Learning community to design an experimental tracking product that will help us all!

