experiment-tracking-swanlab

Log metrics, configurations, and media assets to SwanLab run dashboards.

Updated May 2, 2026
One-click install
npx skills add https://github.com/qcmuu/AI-Research-Skills --skill experiment-tracking-swanlab-qcmuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: experiment-tracking-swanlab
Source: https://github.com/qcmuu/AI-Research-Skills/tree/main/13-mlops/swanlab
Command: npx skills add https://github.com/qcmuu/AI-Research-Skills --skill experiment-tracking-swanlab-qcmuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires swanlab>=0.7.11, pillow>=9.0.0, soundfile>=0.12.0, and includes references (resource) components.

What problem does it solve?

This Skill helps you avoid losing ML experiment context by centralizing metrics, configs, and logged media in SwanLab runs so you can compare experiments reliably.

Core Features & Use Cases

  • Experiment tracking for ML workflows: record project/experiment metadata, configuration, tags, and descriptions for each run.
  • Metrics logging with consistent namespaces: log scalar charts like train/loss and val/accuracy across steps and epochs.
  • Lightweight media logging: attach images, audio, text notes, GIF/video, point clouds, and molecule visuals to the same run for better debugging and reporting.
  • Cloud, local, or self-hosted operation: support offline-first logging via mode="local" and later inspection using swanlab watch/sync.
  • Framework integrations: integrate with Transformers (report_to="swanlab"), PyTorch Lightning (SwanLabLogger), and Fastai (SwanLabCallback) to minimize manual boilerplate.

Quick Start

Initialize a run in SwanLab, log train/val metrics each epoch, and then finalize it with run.finish().

Frequently Asked Questions about experiment-tracking-swanlab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I track ML experiment metrics in a self-hosted dashboard?

To track ML experiment metrics in a self-hosted dashboard, initialize a run with swanlab.init and log metrics like train/loss and val/accuracy using swanlab.log. This centralizes your experiment context for reliable comparison across local and self-hosted environments.

Can I use SwanLab for experiment tracking with PyTorch Lightning?

Yes, you can use SwanLab for experiment tracking with PyTorch Lightning by integrating the SwanLabLogger. This framework-native integration minimizes manual boilerplate by automatically capturing training and evaluation metrics in your dashboard.

What is the best way to log media assets like images and audio during model training?

The best way to log media assets like images and audio during model training is using swanlab.log. It attaches images, audio, text notes, GIF/video, and point clouds to the same run, requiring the pillow and soundfile dependencies for better debugging and reporting.

Does SwanLab support offline experiment tracking for local environments?

SwanLab supports offline experiment tracking via mode="local". This allows offline-first metrics logging without immediate cloud connectivity, enabling later inspection and synchronization using swanlab watch and swanlab sync commands.

Do I need extra dependencies to log audio and images to SwanLab runs?

Yes, you need extra dependencies to log audio and images to SwanLab runs. Installing the core swanlab package must be accompanied by pillow for image processing and soundfile for audio processing to enable lightweight media logging.

How do I integrate experiment tracking into a Hugging Face Transformers Trainer workflow?

To integrate experiment tracking into a Hugging Face Transformers Trainer workflow, set report_to="swanlab" in your training arguments. This automatically logs training and evaluation metrics to your SwanLab run dashboard without manual logging boilerplate.