SwanLab-Skill

June 26, 2026 ยท View on GitHub

๐Ÿง SkillHub | ๐Ÿค– ModelScope

Skills to guide Claude Code, Codex, and other coding agents on using the SwanLab AI training experiment tracking platform โ€” both writing tracking code and querying experiment data.

๐Ÿš€ Getting Started

npx skills add SwanHubX/SwanLab-Skill -y -g

Then log in to SwanLab:

pip install swanlab
swanlab login          # paste your API key from https://swanlab.cn
swanlab ping           # (optional) check connectivity
swanlab verify         # (optional) validate credentials

npx skills is a utility for installing skills into major coding agent CLIs. Use --global to install for all projects, or --agent <name> to target a specific agent. See the npx skills docs for more details.

๐Ÿ’ก What you can do

CapabilityHowEntry point
Log metrics & rich media (image / audio / text) during training and fine-tuningPython SDK (swanlab.init / swanlab.log / swanlab.finish + media helpers)references/SDK_QUICKSTART.md
Inspect a run's metrics, logs, summaries, columns, and mediaswanlab api run ... CLIreferences/CLI_REFERENCE.md
List / filter experiments by config or summary conditionsswanlab api run filter CLIreferences/CLI_REFERENCE.md
Manage projects, self-hosted users, and other resourcesswanlab api project / user CLIreferences/CLI_REFERENCE.md
Understand the data model & terminology before queryingโ€”references/SWANLAB_CONCEPTS.md
Plot a single experiment's scalar metrics as a line chartHelper scriptscripts/plot_metrics.py user/proj/run -k loss,acc -o chart.png
Compare the same metric across multiple experiments (normalization + best-run ranking)Helper scriptscripts/runs_benchmark.py user/proj/r1 user/proj/r2 -k loss --direction lower

Both helper scripts accept --data file.json to render from previously saved query output, and require swanlab login (or --api-key / --host).

๐Ÿชœ Run Modes

swanlab.init(mode=...) controls where data goes:

ModeLocal StorageCloud UploadUse Case
onlineYesYesNormal cloud usage. Requires login.
localYesNoAir-gapped / no account needed.
offlineYesNoSave locally, upload to cloud later via swanlab sync.
disabledNoNoCompletely disable all logging.

๐Ÿ“š License

Apache License 2.0.

Copyright 2024-2025 Emotion Machine (Beijing) Technology Co., Ltd.