/labrat:comparefrom Lab Rat
Compares training runs at the same epoch across wandb, neptune, tensorboard, mlflow, or local files. Aligns runs at the student's current step to avoid misleading comparisons. Writes run summaries, experiment reports, and monitors training progress.
Ships in Lab Rat. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The most common comparison error is reporting "run A is 4 percentage points behind baseline" when run A is at epoch 11 of 100 and the baseline number is from epoch 100. The student is still training; the comparison is meaningless. This skill enforces same-epoch alignment.
The agentic Stop hook routes here from reason when an assistant reports a delta without aligning the runs.
If the question is "why did X fail / diverge / underperform", go to /labrat:debug first.
Check in this order:
WANDB_API_KEY env var set, or wandb imports or a *.yaml config with wandb keys in the project → wandbNEPTUNE_API_TOKEN env var set, or a *.yaml config with neptune keys → neptuneMLFLOW_TRACKING_URI env var set, or mlruns/ dir present → mlflowruns/ or lightning_logs/ dir present → tensorboard*results*.json / *meta*.json / eval*.csv files in run dirs → local file format: read one sample file and write the analysis code for that format, not a hardcoded scriptIf none, ask the user where metrics live before guessing.
Get full names (no shortcodes). If the user says "run-b vs the baseline", clarify:
run-b run (project + entity + run-id)You need the full curve, not the last reported value. Final-value-only comparisons hide convergence dynamics.
For wandb:
import wandb
api = wandb.Api()
run = api.run("entity/project/run-id")
history = run.history(samples=10000) # full history, not just summary
For tensorboard, parse the event files (tensorboard.backend.event_processing.event_accumulator.EventAccumulator).
For neptune / mlflow, use their respective APIs.
The student is the run still in progress (or the one being evaluated). Get its current epoch / step from the latest history row.
This is the critical step. The baseline went all the way to (say) epoch 100. The student is at epoch 11. Pull the baseline's metrics at epoch 11, not at epoch 100.
student_step = student_history['epoch'].max()
baseline_at_same_step = baseline_history[baseline_history['epoch'] == student_step]
If the baseline doesn't have an exactly-matching step, interpolate or pick the nearest. State which.
Most ML pipelines have a proxy metric (cheap, computed during training, kNN accuracy on features, loss, perplexity) and a target downstream metric (expensive, computed periodically or only at the end, finetuned linear probe accuracy, downstream task F1).
The proxy is for tracking convergence; the target is what the project is actually optimizing. Reporting only the proxy can mislead, a run that lags on kNN may close the gap on downstream finetune. Report both, separately:
| student (ep 11) | baseline (ep 11) | delta |
| proxy (kNN top-1) | 36.4% | 38.9% | -2.5 |
| downstream (linear) | not yet | 42.1% | n/a |
If the user only has proxy data, say so explicitly. Never declare a winner from proxy alone.
In every line of the report, use full run names. Never run-a vs run-b; always imagenet-resnet50-baseline-bs256 vs imagenet-resnet50-distill-from-vit-l. Future-you reading this will not remember the shortcode.
Compact comparison table per metric pair (proxy + downstream). Each row aligned at the student's current step. Each cell traceable to a specific tracker run-id and step. End with one or two sentences interpreting the comparison, student is on track to catch up at step N, projected from current slope is a useful framing; student is winning / losing is rarely warranted before convergence.
Compare runs across more than the primary metric:
Put them in the Results Table of the experiment report below, and identify:
/labrat:rebuttalWhen the user asks for a report or summary:
## Experiment Report
### Overview
- Total runs: N
- Date range: start to end
- Best result: [metric] = [value] (run [name])
### Results Table
| Run | Step | Config Diff | Proxy | Downstream | GPU Hours | Status |
|-----|------|-------------|-------|------------|-----------|--------|
### Key Findings
1. [Finding with evidence]
2. [Finding with evidence]
### Recommendations
1. [Next experiment to try, with justification]
Align every Results Table row at the same step and keep proxy and downstream apart, as in Output above. When updating a GitHub experiment tracker issue with comparison tables, ablation groups, in-place updated comparison figures (gh issue edit --attach), or annotated prediction montages/histograms supporting a claim, follow ../launch/references/tracker-issues.md.
Set up periodic monitoring:
Create a CronCreate job on */10 * * * * that pipes a {"title", "message"} JSON object to the plugin notifier, which forwards it to whatever /labrat:setup configured (ntfy, Slack or email):
echo "{\"title\": \"Training check\", \"message\": \"GPU util: $(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader)\"}" | ${CLAUDE_PLUGIN_ROOT}/scripts/notify.sh
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fcakyon/labrat --plugin labrat11 skills in this plugin
/dataset-curationUse when the user wants to analyze dataset bias, create stratified samples, evaluate fairness, or plan dataset collection. Triggers on phrases like "dataset bias", "stratified sample", "class imbalance", "data distribution", "fairness analysis", or "ethical review".
/debugEvidence-before-action diagnosis of failing ML experiments. Probes the system before guessing causes, process list, dmesg, GPU stats, log scrollback, checkpoint state, then states a hypothesis as a hypothesis and runs a smoke before claiming a root cause. Use when the user asks why a run is failing, diverging, OOMing, hanging, slow, producing weird metrics, has crashed, or asks to debug, diagnose, troubleshoot, or investigate a training issue./experiment-designUse when the user wants to design experiments, plan ablation studies, structure baselines, or create incremental evaluation strategies. Triggers on phrases like "design ablation", "plan experiment", "what experiments should I run", "baseline comparison", or "experiment matrix".
/launchPre-flight checklist for long-running ML training jobs and GitHub research tracker issue formatting, covering config diff, run naming, path verification, monitoring setup, restart-cleanup, and canonical tracker issue layout. Use when the user asks to launch, kick off, start, restart, or kill a training run, format or update a research tracker issue, or mentions launching a multi-hour or multi-day GPU job (python train, accelerate launch, torchrun, deepspeed, sbatch, tmux training)./literature-researchUse when the user wants to find related work, survey a research area, run a literature gap analysis, or discover open-source implementations. Maps existing work on a topic and confirms with web search what is missing. Triggers on phrases like "find papers on", "related work", "literature review", "what papers exist", "gap analysis", "literature gaps", "what's missing in", "open source implementation", or "papers with code".
/paper-checkCheck a paper against its code, results and citations before submission (numbers, terms, code vs paper, formulas vs code, BibTeX and cited claims via DBLP and Crossref, eval integrity, reviewer checklist and anonymity), and prepare its code for open-source release. Use when the user says "verify claims" / "verify paper against code", "check numbers" / "do the numbers match" / "are my numbers right", "formula vs code", "audit my paper", "cross-check claims or results", "paper consistency check", "check citations", "verify BibTeX", "publish code" / "open source release" / "code release", "structure a research repository for publication", "create reproducible research artifacts", "reproducibility checklist for a code release", "reviewer checklist", "check anonymity", "ethics statement", or "prepare for publication".
Other plugins' skills for the same job