experiment-tracking-swanlab

Track ML experiments with metrics, configs, and media using SwanLab.

2|Updated Aug 15, 2026
One-click install
npx skills add https://github.com/Jensen-Yao/agents-skills --skill experiment-tracking-swanlab-jensen-yao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: experiment-tracking-swanlab
Source: https://github.com/Jensen-Yao/agents-skills/tree/main/skills/swanlab
Command: npx skills add https://github.com/Jensen-Yao/agents-skills --skill experiment-tracking-swanlab-jensen-yao

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 - Metric and Config Logging: Initialize runs with swanlab.init, capture hyperparameters, and log scalars with grouped namespaces like train/loss and val/accuracy. - Media and Chart Visualization: Log images, audio, text, GIFs, point clouds, molecules, and pyecharts-based charts for richer run inspection. - Framework Integrations: Connect with PyTorch, HuggingFace Transformers (report_to="swanlab" or SwanLabCallback), PyTorch Lightning (SwanLabLogger), and Fastai (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 via swanlab watch. ## Quick Start Use the SwanLab skill to set up experiment tracking for my PyTorch training loop with metric 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 finalize the run and view results in the dashboard.

How to log metrics from HuggingFace Transformers Trainer?▼

On transformers>=4.50.0, set report_to="swanlab" in TrainingArguments and the integration runs automatically. For older versions or custom control, pass SwanLabCallback from swanlab.integration.transformers to the Trainer callbacks list.

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, audio, text, GIF videos, numpy point clouds via Object3D, and molecules via Molecule.from_smiles. It also accepts pyecharts chart objects through swanlab.echarts for custom line, bar, and heatmap visualizations.

Why does my SwanLab chart not render in the dashboard?▼

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