Skip to main content
This cheat sheet provides quick-reference Python code examples for common W&B tasks, demonstrating recommended practices. Examples use placeholder syntax like <project> that you can replace with your own values. Each example is a standalone snippet you can adapt to your needs. Select a card to view code examples in that category.

Runs

Code examples to initialize, manage, and fork W&B runs

Logging

Code examples to log metrics, hyperparameters, tables, and custom data to W&B

Artifacts

Code examples to create, update, download, and manage W&B Artifacts for data versioning

Registry

Code examples to organize and manage model versions in W&B Registry