wandb/examples — 1.2k★ on GitHub (Jupyter Notebook). Example deep learning projects that use wandb's features.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This repository contains scripts and notebooks that show how to use Weights &
Biases (W&B) in machine learning workflows. Use these examples to add
experiment tracking, model and dataset versioning, hyperparameter tuning, rich
media logging, and collaborative reports to your own projects.
For product documentation, see the W&B Models documentation and
the W&B integrations guide.
Repository layout
Path
Contents
colabs/
Google Colab notebooks for W&B features, frameworks, and workflows.
examples/
Runnable scripts organized by framework or W&B feature.
wandb-scim/
SCIM administration examples.
The examples use different frameworks and dependency sets. Before running an
example, check the README or requirements.txt file in that example's
directory.
Get started
Install the W&B Python SDK and authenticate your machine:
pip install --upgrade wandb
wandb login
Clone this repository:
git clone https://github.com/wandb/examples.git
cd examples
For a local script, install any example-specific dependencies listed in that
directory and run the training file:
cd examples/pytorch/pytorch-cnn-fashion
python train.py
For notebooks, open the matching Colab from colabs/README.md
or run the notebook locally in your preferred environment.
Track an experiment
Use wandb.init() to create a run, run.config to store input settings, and
run.log() to record metrics during training.
import wandb
import random
# Project that the run is recorded to
project = "my-awesome-project"
# Dictionary with hyperparameters
config = {
'epochs' : 10,
'lr' : 0.01
}
with wandb.init(project=project, config=config) as run:
offset = random.random() / 5
print(f"lr: {config['lr']}")
# Simulate a training run
for epoch in range(2, config['epochs']):
acc = 1 - 2**-config['epochs'] - random.random() / config['epochs'] - offset
loss = 2**-config['epochs'] + random.random() / config['epochs'] + offset
print(f"epoch={config['epochs']}, accuracy={acc}, loss={loss}")
run.log({"accuracy": acc, "loss": loss})
Configuration values are for inputs and independent variables, such as learning
rate, batch size, dataset name, and model architecture. Use logged metrics for
outputs and values that change during training.
Learn more:
Experiments overview
Configure experiments
Python SDK reference
Use framework integrations
W&B integrates with common ML frameworks so you can log metrics, system stats,
artifacts, and model checkpoints with minimal code changes. Some integrations that W&B Models supports include:
PyTorch
Keras
TensorFlow
HuggingFace Transformers
PyTorch Lightning
XGBoost
See Integrations in the W&B Developer guide for more information.
If a framework is not listed here, start with the
Add W&B to a Python library guide or use the core W&B Python SDK shown in
the previous section.
Optimize hyperparameters with Sweeps
Use W&B Sweeps to define a hyperparameter search space, launch agents, and
compare results in the W&B App. Sweeps support search strategies such as grid
search, random search, and Bayesian optimization.
Good starting points:
Sweeps overview
Sweeps walkthrough
PyTorch Sweeps Colab
examples/wandb-sweeps/
Version datasets and models with Artifacts
Use W&B Artifacts to track datasets, models, and other files as versioned inputs
and outputs of your runs. Artifacts help you reproduce experiments, inspect
lineage, and share assets across teams.
import wandb
with wandb.init(project="artifact-demo", job_type="train") as run:
model_artifact = wandb.Artifact("model", type="model")
model_artifact.add_file("model.pt")
run.log_artifact(model_artifact)
Learn more:
Artifacts overview
Create an artifact
Download and use artifacts
Artifacts Colab
Visualize and query data with Tables
Use W&B Tables to log structured data, rich media, predictions, and evaluation
results. Tables are useful for comparing examples across models, finding
misclassifications, and sharing qualitative results.
Use W&B Reports to organize charts, describe findings, and share experiment
updates with collaborators. Reports can include plots, tables, media, Markdown,
and links to the underlying runs.
TopGit's metadata for wandb/examples does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is wandb/examples?
wandb/examples (wandb/examples) is a Jupyter Notebook project on GitHub. From the project's own README: Example deep learning projects that use wandb's features.
Where can I see wandb/examples in action?
The project maintains a homepage at http://wandb.ai. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about wandb/examples?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/wandb/examples is the definitive source.
Read full README in the tab above.
Curious whether examples is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about examples.