简介
实时监控Weights & Biases训练实验,自动检测梯度异常、训练停滞和失败,支持多维度对比分析。
原始描述
Monitor and analyze Weights & Biases training runs. Use when checking training status, detecting failures, analyzing loss curves, comparing runs, or monitoring experiments. Triggers on "wandb", "training runs", "how's training", "did my run finish", "any failures", "check experiments", "loss curve", "gradient norm", "compare runs".
通过你的 Agent 添加
安装目录:wandb/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: wandb
description: Monitor and analyze Weights & Biases training runs. Use when checking training status, detecting failures, analyzing loss curves, comparing runs, or monitoring experiments. Triggers on "wandb", "training runs", "how's training", "did my run finish", "any failures", "check experiments", "loss curve", "gradient norm", "compare runs".
Weights & Biases
Monitor, analyze, and compare W&B training runs.
Setup
wandb login
# Or set WANDB_API_KEY in environment
Scripts
Characterize a Run (Full Health Analysis)
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/characterize_run.py ENTITY/PROJECT/RUN_ID
wandb login
# Or set WANDB_API_KEY in environment
Characterize a Run (Full Health Analysis)
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/characterize_run.py ENTITY/PROJECT/RUN_ID
Analyzes:
- Loss curve trend (start → current, % change, direction)
- Gradient norm health (exploding/vanishing detection)
- Eval metrics (if present)
- Stall detection (heartbeat age)
- Progress & ETA estimate
- Config highlights
- Overall health verdict
Options: --json for machine-readable output.
Watch All Running Jobs
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/watch_runs.py ENTITY [--projects p1,p2]
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/watch_runs.py ENTITY [--projects p1,p2]
Quick health summary of all running jobs plus recent failures/completions. Ideal for morning briefings.
Options:
--projects p1,p2— Specific projects to check--all-projects— Check all projects--hours N— Hours to look back for finished runs (default: 24)--json— Machine-readable output
Compare Two Runs
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/compare_runs.py ENTITY/PROJECT/RUN_A ENTITY/PROJECT/RUN_B
~/clawd/venv/bin/python3 ~/clawd/skills/wandb/scripts/compare_runs.py ENTITY/PROJECT/RUN_A ENTITY/PROJECT/RUN_B
Side-by-side comparison:
- Config differences (highlights important params)
- Loss curves at same steps
- Gradient norm comparison
- Eval metrics
- Performance (tokens/sec, steps/hour)
- Winner verdict
Python API Quick Reference
import wandb
api = wandb.Api()
# Get runs
runs = api.runs("entity/project", {"state": "running"})
# Run properties
run.state # running | finished | failed | crashed | canceled
run.name # display name
run.id # unique identifier
run.summary # final/current metrics
run.config # hyperparameters
run.heartbeat_at # stall detection
# Get history
history = list(run.scan_history(keys=["train/loss", "train/grad_norm"]))
Metric Key Variations
import wandb
api = wandb.Api()
# Get runs
runs = api.runs("entity/project", {"state": "running"})
# Run properties
run.state # running | finished | failed | crashed | canceled
run.name # display name
run.id # unique identifier
run.summary # final/current metrics
run.config # hyperparameters
run.heartbeat_at # stall detection
# Get history
history = list(run.scan_history(keys=["train/loss", "train/grad_norm"]))
Scripts handle these automatically:
- Loss:
train/loss,loss,train_loss,training_loss - Gradients:
train/grad_norm,grad_norm,gradient_norm - Steps:
train/global_step,global_step,step,_step - Eval:
eval/loss,eval_loss,eval/accuracy,eval_acc
Health Thresholds
- Gradients > 10: Exploding (critical)
- Gradients > 5: Spiky (warning)
- Gradients < 0.0001: Vanishing (warning)
- Heartbeat > 30min: Stalled (critical)
- Heartbeat > 10min: Slow (warning)
Integration Notes
For morning briefings, use watch_runs.py --json and parse the output.
For detailed analysis of a specific run, use characterize_run.py.
For A/B testing or hyperparameter comparisons, use compare_runs.py.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。