experiment-tracking-swanlab

Track ML experiments with SwanLab metrics, media logging, and framework integrations.

13.0k|930|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/Orchestra-Research/AI-research-SKILLs --skill experiment-tracking-swanlab-orchestra-research
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: experiment-tracking-swanlab
Source: https://github.com/Orchestra-Research/AI-research-SKILLs/tree/main/13-mlops/swanlab
Command: npx skills add https://github.com/Orchestra-Research/AI-research-SKILLs --skill experiment-tracking-swanlab-orchestra-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires swanlab, pillow, soundfile, and includes references (resource) components.

What problem does it solve? Machine learning training runs produce scattered metrics, configs, and artifacts that are hard to compare and reproduce. This Skill provides guidance for logging experiments with SwanLab, an open-source tracker that works in cloud, local, or self-hosted modes. ## Core Features & Use Cases - Run and Config Tracking: Initialize runs with swanlab.init, capture hyperparameters, and log scalar metrics with stable namespaced keys like train/loss and val/accuracy. - Media and Chart Logging: Log images, audio, text, GIF videos, point clouds, molecules, and custom swanlab.echarts visualizations such as line, bar, and heatmap charts. - Framework Integrations: Connect with PyTorch, HuggingFace Transformers via report_to="swanlab" or SwanLabCallback, PyTorch Lightning via SwanLabLogger, and Fastai via SwanLabCallback. - Use Case: A researcher fine-tuning a BERT classifier can set report_to="swanlab" in TrainingArguments, then compare validation loss across seeds in the SwanLab dashboard, or run fully offline with mode="local" and inspect logs later using swanlab watch. ## Quick Start Use the SwanLab skill to set up experiment tracking for my PyTorch training loop with config capture, loss logging, and a local dashboard.

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 PyTorch experiments with SwanLab?▼

Call swanlab.init with your project name and config dict, then call swanlab.log with metrics like train/loss inside your training loop. Finish with run.finish() to close the run and view results in the dashboard.

How to log experiments from HuggingFace Transformers Trainer?▼

Set report_to="swanlab" in TrainingArguments for transformers 4.50.0 or newer. For older versions, add SwanLabCallback from swanlab.integration.transformers to the Trainer callbacks list with your project and config.

Does SwanLab support offline or self-hosted experiment tracking?▼

Yes. Use mode="local" with a logdir for offline logging, then inspect with swanlab watch -l ./swanlog or sync later with swanlab sync. For self-hosted setups, pass your server host to swanlab.login.

What media types can SwanLab log during training?▼

SwanLab logs images via swanlab.Image, audio via swanlab.Audio, text, GIF videos via swanlab.Video, numpy point clouds via swanlab.Object3D, and molecules via swanlab.Molecule.from_smiles. Video currently accepts only GIF file paths.

Why is my SwanLab chart not rendering in the dashboard?▼

Charts fail when raw option dictionaries are passed instead of chart objects. Log a swanlab.echarts object such as Line, Bar, or HeatMap directly, and convert image arrays to HWC uint8 format before wrapping them in swanlab.Image.