Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 2, 2026·3 min de lecture

SwanLab — Open-Source ML Training Tracker and Visualizer

A lightweight experiment tracking tool with a modern dashboard for logging, comparing, and visualizing ML training runs.

Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 29/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Stage only
Confiance
Confiance : Established
Point d'entrée
SwanLab Overview
Commande de staging sûr
npx -y tokrepo@latest install 6d664a46-7658-11f1-9bc6-00163e2b0d79 --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

Introduction

SwanLab is an open-source ML experiment tracking and visualization tool that provides a modern web dashboard for logging training metrics, comparing runs, and collaborating on experiments. It can be used fully offline or synced to SwanLab Cloud.

What SwanLab Does

  • Logs training metrics, hyperparameters, and system resource usage during model training
  • Provides an interactive web dashboard for visualizing and comparing experiment runs
  • Supports logging of images, audio, text, and other media alongside scalar metrics
  • Integrates with PyTorch, Transformers, LLaMA Factory, Ultralytics, Keras, and more
  • Offers both cloud-hosted and fully self-hosted deployment options

Architecture Overview

The SwanLab Python client captures metric data from training loops and writes it to a local log directory in a structured format. The swanlab watch command starts a local web server that reads these logs and renders an interactive dashboard. For team collaboration, logs can be synced to SwanLab Cloud via the API. The dashboard uses React for the frontend and supports real-time updates during active training runs.

Self-Hosting & Configuration

  • Install with pip install swanlab on Python 3.8+
  • Initialize tracking with swanlab.init(project="name") at the start of your script
  • View local experiments with swanlab watch --logdir ./swanlog
  • Sync to SwanLab Cloud by setting SWANLAB_API_KEY in your environment
  • Use swanlab.init(mode="local") for fully offline tracking without any cloud sync

Key Features

  • Modern, clean dashboard UI with chart types including line, scatter, bar, and media viewers
  • Multi-run comparison with overlay charts and parallel coordinate plots
  • Framework integrations provide one-line setup for popular training libraries
  • Lightweight client with minimal dependencies and low overhead during training
  • Self-hosted mode keeps all experiment data on your own infrastructure

Comparison with Similar Tools

  • Weights & Biases — More mature with broader features; SwanLab offers a lighter open-source alternative
  • MLflow — Broader MLOps platform; SwanLab focuses on experiment tracking with a cleaner UI
  • TensorBoard — TensorFlow-native visualization; SwanLab is framework-agnostic with richer comparison
  • ClearML — Full MLOps suite; SwanLab is lighter and quicker to set up for pure tracking
  • Neptune — Hosted tracking platform; SwanLab provides both self-hosted and cloud options

FAQ

Q: Can I use SwanLab without creating a cloud account? A: Yes. Set mode="local" in swanlab.init() and use swanlab watch to view experiments locally.

Q: Which ML frameworks does it integrate with? A: PyTorch, Transformers, Lightning, Keras, Ultralytics, LLaMA Factory, MMEngine, and others via callback integrations.

Q: How does it compare to Weights & Biases? A: SwanLab provides similar core tracking features with a lighter footprint. W&B offers more advanced features like sweeps, artifacts, and reports.

Q: Can multiple team members view the same experiments? A: Yes, through SwanLab Cloud or by sharing access to a self-hosted instance.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires