界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

experiment-tracking

experiment-tracking

【效率与协作】Guide SwanLab experiment tracking with safe init/log/finish, run lifecycle, scalar/config logging, file saving, async logging, and disabled/local/offline smokes.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: experiment-tracking description: "Guide SwanLab experiment tracking with safe init/log/finish, run lifecycle, scalar/config logging, file saving, async logging, and disabled/local/offline smokes." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

SwanLab Experiment Tracking

Use this sub-skill when the task is to add, debug, or verify ordinary SwanLab experiment tracking code: swanlab.init, swanlab.log, swanlab.finish, swanlab.run, swanlab.get_run, swanlab.has_run, scalar/config logging, save, and async_log.

Route here for

  • Converting a basic training loop or README-style quick start into credential-safe SwanLab code.
  • Choosing mode="disabled", mode="local", or mode="offline" for smoke tests, CI, examples, or no-network environments.
  • Managing the one-active-run lifecycle, including reinit=True, with swanlab.init(...) as run:, and safe finally blocks.
  • Logging scalar metrics and config dictionaries/files without media-specific detail.
  • Checking whether an active run exists before logging from utility code.
  • Saving matched files with run.save / swanlab.save and understanding now, end, and live policies at a high level.
  • Using async_log safely and knowing why forked child processes cannot use the parent run.

Route elsewhere

  • Credentials, API keys, login, custom hosts, settings precedence, or exact mode configuration: settings-and-modes.
  • Images, audio, video, text objects, HTML, ECharts, molecules, 3D objects, or custom charts: media-and-custom-charts.
  • Uploading/syncing an offline/local run after training or converting W&B/TensorBoard/MLflow logs: sync-and-converters.
  • Framework callbacks for Transformers, Lightning, Keras, Ray, FastAI, Stable-Baselines3, etc.: integrations-and-plugins.

Read these references

Safe smoke check

Run the bundled disabled-mode checker from this sub-skill directory after installing SwanLab:

python scripts/check_disabled_tracking.py

The checker imports SwanLab, starts mode="disabled", logs scalar data, finishes the run, and asserts that the active run resets to None. It does not require credentials or network access.

我的收藏