Logs ML training with wandb.init/log, hyperparameter sweeps, artifact lineage, and the model registry. Use when tracking experiments, comparing runs, or sweeping hyperparameters in PyTorch, TensorFlow, or HuggingFace. Not for LLM app tracing and prompts (langfuse) or local Hub eval harnesses (community-evals).
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
weights-and-biases
description
Logs ML training with wandb.init/log, hyperparameter sweeps, artifact lineage, and the model registry. Use when tracking experiments, comparing runs, or sweeping hyperparameters in PyTorch, TensorFlow, or HuggingFace. Not for LLM app tracing and prompts (langfuse) or local Hub eval harnesses (community-evals).
version
1.0.1
author
Orchestra Research
license
MIT
dependencies
["wandb"]
platforms
["linux","macos","windows"]
metadata
{"hermes":{"tags":["MLOps","Weights And Biases","WandB","Experiment Tracking","Hyperparameter Tuning","Model Registry","Collaboration","Real-Time Visualization","PyTorch","TensorFlow","HuggingFace"]}}
Weights & Biases: ML Experiment Tracking & MLOps
When to Use
Use this skill when you need to:
Track ML experiments with automatic metric, config, and system logging
Visualize training in real-time dashboards and compare runs across hyperparameters
Run hyperparameter sweeps (grid, random, Bayesian) to optimize model performance
Manage model registry with versioning, aliases, and lineage
Track artifacts (datasets, models, code) with full provenance
Integrate W&B into PyTorch, TensorFlow/Keras, HuggingFace, or PyTorch Lightning workflows
Collaborate on ML projects with shared team workspaces and reports
Trigger keywords: wandb, weights and biases, experiment tracking, sweep, hyperparameter tuning, model registry, artifact lineage, training dashboard, wandb.init, wandb.log, wandb.sweep
Prerequisites
Python 3.8+
A W&B account (free tier sufficient for public projects)
Forgetting wandb.finish(): Always call wandb.finish() at the end of training. If the process crashes, the run may remain in a "running" state. Use with wandb.init(...) as run: context manager to guarantee cleanup.
Logging too frequently: Calling wandb.log every batch with high-frequency data can slow training and flood dashboards. Batch logging every N steps (e.g., if batch_idx % 100 == 0) is preferred.
Mismatched metric keys across runs: W&B groups metrics by key. If one run logs "val/loss" and another logs "validation_loss", they will not appear on the same chart. Standardize key names.
Not setting WANDB_MODE=offline on air-gapped machines: Training will hang or fail on network timeouts. Set offline mode and wandb sync later.
Hardcoding API keys in source files: Never embed real keys. Use environment variables (WANDB_API_KEY) or a secrets manager. Use YOUR_KEY in all shared examples.
Sweep agent count too high without resources: wandb.agent(..., count=50) launches 50 sequential trials by default. For parallel sweeps, launch multiple agent processes pointing to the same sweep_id.
Artifact name collisions: Artifact names must be unique within a project and type. Re-logging with the same name creates a new version, not an overwrite. Use aliases (:latest, :best) to reference specific versions.
Large file uploads blocking training: wandb.save and artifact.add_file upload synchronously by default. For very large checkpoints, consider logging artifacts less frequently or using artifact.add_reference for cloud-stored files.
Windows path issues: Use raw strings or forward slashes in Python paths on Windows (r"~\data" or "data/train.csv"). W&B artifacts handle both but mixing backslashes in artifact names is unsupported.
Verification
Verify Installation and Auth
wandb --version
# Expected: wandb, version X.Y.Z
wandb status
# Expected: "Logged in" with entity name
Verify a Run Was Logged
After running a training script:
wandb sync --view <run_directory> # offline mode# Or check the printed run URL in stdout:# https://wandb.ai/<entity>/<project>/runs/<run_id>
Verify Artifacts
import wandb
run = wandb.init(project="my-project")
art = run.use_artifact("training-dataset:latest")
print(art.version) # Expected: v0, v1, ...print(art.manifest.entries) # Lists files in artifact
Verify Sweep Is Running
# In the W&B UI:# https://wandb.ai/<entity>/<project>/sweeps/<sweep_id># Expected: agent runs appearing with logged val/accuracy
Verify Offline Sync
wandb sync ./wandb/offline-run-20250101_000000-<run_id>
# Expected: "Synced <N> files" and a live run URL