wandb/examples là dự án Jupyter Notebook với 1.2k sao. Example deep learning projects that use wandb's features.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/wandb/examples là nguồn chính thức.
wandb/examples có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho wandb/examples. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
wandb/examples có trang demo không?
Dự án có trang chủ ở http://wandb.ai. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
wandb/examples là gì?
wandb/examples (wandb/examples) là dự án Jupyter Notebook trên GitHub. Theo mô tả gốc: Example deep learning projects that use wandb's features.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về examples?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về examples.