Retrieve and analyze wandb sweep results via the wandb API, identify the best run by the sweep's optimization metric, compute per-parameter impact, review learning curves, flag crashed or early-stopped runs, and optionally analyze GPU resource usage from recorded monitoring CSVs. Produces a findings section appended to docs/LOGS/log_sweep.md. Use this skill whenever a sweep has finished (or has enough completed runs) and the user wants to analyze results, pick the best hyperparameter configuration, understand which parameters mattered most, or says things like "analyze the sweep", "what were the best runs", "summarize the sweep results", "which hyperparameters worked", "スイープ結果を分析", "どの設定が良かった". Also trigger when the user provides a wandb sweep ID or references sweep results in conversation.
Retrieve and analyze wandb sweep results, extract insights, and optionally analyze GPU resource usage.
Identify the sweep using one of the following:
abc123de or entity/project/abc123de)docs/LOGS/log_sweep.md--project <name> (default: infer from existing sweep configs or ask)Ask the user for any missing information.
Retrieve sweep metadata and run results via the wandb API:
import wandb
api = wandb.Api()
sweep = api.sweep(f"<entity>/<project>/<sweep_id>")
runs = sweep.runs
Retrieve entity from wandb.Api().default_entity. Collect from each run:
Identify the sweep's optimization metric from sweep.config["metric"] rather than
assuming a specific metric name.
Only include this section if the training framework uses early stopping. Analyze:
Check for docs/LOGS/gpu_monitor_*<sweep_id>*.csv. If found:
Stop the monitoring session if still running:
tmux kill-session -t "sweep-monitor-<short_id>" 2>/dev/null
Read the CSV and present:
Per-GPU summary:
| GPU | Util% (mean/p95) | Memory (mean/max) | Power (mean) |
|---|
Key observations:
Include in the log entry under ### Resource usage.
If no monitoring data exists, skip this section silently.
Derive from the analysis:
Present results in conversation first, then after user confirmation append to
the corresponding entry in docs/LOGS/log_sweep.md:
### Results
**Best run**: `<run_id>` (<metric_name>: <value>)
- <parameter configuration>
**Parameter impact** (by mean metric, descending):
| Parameter | Value | Mean | Std |
|-----------|-------|------|-----|
| ... | ... | ... | ... |
**Findings**:
- <key findings in bullet points>
**Next steps**:
- <recommended follow-ups>
If early stopping assessment or resource usage data is available, append those sections too.
wandb login statuswandb.Api().default_entitywandb/ directory run data may also be used supplementarily