wandb
Use W&B's Python SDK and CLI for experiment tracking, offline/local workflows, artifacts and registries, Public API exports, automations, sweeps, and Launch jobs.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- wandb
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use W&B's Python SDK and CLI for experiment tracking, offline/local workflows, artifacts and registries, Public API exports, automations, sweeps, and Launch jobs.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/repo-provenance.md2.1 KB
- 参考文档references/repo-routing-metadata.json442 B
- 参考文档references/troubleshooting.md4.3 KB
- 脚本scripts/check_wandb_environment.py3.3 KB
03 SKILL.md 正文
W&B Repo Skill
Use this skill when a task involves the wandb Python package, the wandb/wb CLI, experiment tracking, local/offline run management, artifacts/model registry, Public API queries, automations, hyperparameter sweeps, or W&B Launch jobs.
Install and Verify
For ordinary users, install the public package:
python -m pip install wandb
python - <<'PY'
import wandb
print(wandb.__version__)
print(wandb.init)
PY
Use optional extras only when the workflow needs them:
- Cloud artifact storage:
wandb[aws],wandb[gcp], or Azure storage/identity packages. - Rich media logging:
wandb[media]plus framework/media libraries used by the data. - Sweeps/Launch/cloud queues:
wandb[sweeps],wandb[launch], and provider SDKs or container tooling required by the target backend. - Workspaces or model helpers:
wandb[workspaces]orwandb[models]when a task explicitly uses those surfaces.
For a local source checkout, expect compiled helper artifacts such as wandb-core to be built. If source installation fails, read references/troubleshooting.md before broadening dependencies.
Run the bundled environment check when you need a safe local diagnostic:
python scripts/check_wandb_environment.py --check-cli
Route by Workflow
- Experiment tracking in Python: Use
sub-skills/experiment-tracking/SKILL.mdforwandb.init(),Run.log(), config, summary, tables/media/plots, metric axes, notebooks, offline/disabled modes, and tracking smoke checks. - CLI and local/offline workflows: Use
sub-skills/cli-and-local-workflows/SKILL.mdforwandb login,wandb init,wandb status,wandb offline/online/disabled,wandb sync, local run directories, environment variables, cache cleanup, Docker wrapping, and self-hosted host configuration. - Artifacts and registries: Use
sub-skills/artifacts-and-registries/SKILL.mdforwandb.Artifact,Run.log_artifact(),Run.use_artifact(), artifact aliases/versions, downloads,wandb artifact ..., storage references, registry linking, and model registry troubleshooting. - Public API and automations: Use
sub-skills/public-api-and-automation/SKILL.mdforwandb.Api, querying runs/projects/sweeps/files/reports/artifacts, exporting history, pagination, and automation events/filters/actions/scopes. - Sweeps and Launch: Use
sub-skills/sweeps-and-launch/SKILL.mdfor sweep YAML/JSON,wandb.sweep(),wandb.agent(),wandb sweep,wandb agent, Launch jobs, queues, launch agents, resource backends, and structural config validation.
Shared References
references/repo-provenance.md: read before deciding whether this skill is current for a different W&B checkout or before running a refresh.references/troubleshooting.md: use for cross-cutting install/import, authentication, base URL, optional dependency, source-build, and local service issues.scripts/check_wandb_environment.py: safe diagnostics for installed package version, importability, CLI availability, optional extras, and selected environment variables with secrets redacted.
Safe Defaults
- Prefer
with wandb.init(...) as run:so runs finish even when code raises. - Use
mode="offline"for credentials-free testing and local-only capture; sync later with CLI guidance. - Never print API keys or
.netrccontents. TreatWANDB_API_KEYas present/absent only. - Use full W&B paths such as
entity/project/run_idorentity/project/artifact:aliaswhen defaults could resolve to the wrong account. - For destructive commands such as
wandb sync --cleanor cache cleanup, explain what will be deleted and ask before running them. - Do not invent cloud credentials, queues, Kubernetes contexts, container registries, IAM roles, bucket names, or self-hosted server URLs.
Common Cross-Workflow Paths
- If a training script needs both tracking and datasets/models, start with
experiment-tracking, then route artifact inputs/outputs toartifacts-and-registries. - If an offline run must be uploaded later, instrument with
experiment-trackingand usecli-and-local-workflowsforwandb sync. - If a report/export task references existing runs, use
public-api-and-automation; if it needs to create future runs, route back toexperiment-tracking. - If a sweep trial logs metrics or artifacts, use
sweeps-and-launchfor orchestration,experiment-trackingfor trial logging, andartifacts-and-registriesfor data/model lineage.
Freshness Check
This skill was generated from repository evidence and live package inspection. Read references/repo-provenance.md if the current checkout, package version, public CLI/API, tests, or docs have changed. If the provenance differs materially, refresh the skill from the repository before relying on exact signatures or command behavior.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).