←back to Blog

Meet Trackio: The Free, Local-First, Open-Source Experiment Tracker Python Library that Simplifies and Enhances Machine Learning Workflows

Meet Trackio: The Free, Local-First, Open-Source Experiment Tracker Python Library that Simplifies and Enhances Machine Learning Workflows

Understanding the Target Audience for Trackio

The primary audience for Trackio includes individual researchers, small teams, and data scientists engaged in machine learning projects. These users often face challenges such as complicated setup processes, high costs of proprietary tools, and data privacy concerns. Their goals include simplifying experiment tracking, ensuring data accessibility, and enhancing collaboration without incurring additional costs. They are interested in open-source solutions and prioritize tools that integrate seamlessly with existing workflows. Communication preferences lean towards concise, technical documentation with practical examples and straightforward integration instructions.

What Is Trackio?

Trackio is a Python package designed as a drop-in replacement for widely used libraries like wandb, compatible with foundational API calls (wandb.init, wandb.log, wandb.finish). This allows users to switch to Trackio or run legacy scripts with minimal code changes—simply import Trackio as wandb and continue working as before.

Key Features

  • Local-First Design: Experiments run and persist locally by default, ensuring privacy and quick access. Sharing is optional.
  • Free and Open Source: No paywalls or feature limitations—collaboration and online dashboards are fully accessible at no cost.
  • Lightweight and Extensible: The entire codebase consists of under 1,000 lines of Python, making it easy to audit and adapt.
  • Integrated with Hugging Face Ecosystem: Out-of-the-box support for Transformers and related libraries allows users to track metrics with minimal setup.
  • Data Portability: All experiment data is easily exportable, enabling custom analytics and seamless integration into research pipelines.

Seamless Experiment Tracking: Local or Shared

Trackio allows researchers to monitor metrics on a local Gradio-powered dashboard or sync with Hugging Face Spaces to share dashboards online. Spaces can be set to private or public without complex authentication for viewers.

To view your experiment dashboard locally:

trackio show

Or, from Python:

import trackio
trackio.show()

To launch dashboards on Spaces, sync your logs to Hugging Face Spaces for instant sharing via a simple URL. Importantly, when running on Spaces, Trackio backs up metrics every 5 minutes to ensure data integrity even in case of a restart.

Plug-and-Play Integration with Your ML Workflow

The integration with the Hugging Face ecosystem is straightforward. For instance, with transformers.Trainer or accelerate, you can log metrics by specifying Trackio as your logger.

from accelerate import Accelerator
accelerator = Accelerator(log_with="trackio")
accelerator.init_trackers("my-experiment")
...

This low-friction approach means anyone using Transformers or Accelerate can immediately start tracking experiments with no additional setup.

Transparency, Sustainability, and Data Freedom

Trackio supports tracking metrics such as GPU energy usage, aligning with Hugging Face’s commitment to environmental responsibility and reproducibility. Your data is always accessible, stored in standard formats, and built using open tools like Gradio and Hugging Face Datasets, making it easy to remix and analyze.

Quick Start

To get started:

pip install trackio
# or
uv pip install trackio

Or, swap the import in your codebase:

import trackio as wandb

Conclusion

Trackio empowers individual researchers and open collaboration in ML by providing a free, local-first experiment tracker. With easy shareability and tight integration with Hugging Face tools, Trackio eliminates the friction and cost associated with traditional solutions.

For more technical details, visit the GitHub Page for tutorials, codes, and notebooks. Stay updated by following us on Twitter and join our community on ML SubReddit with over 100k members.