Qlaudia

← All courses

Weights & Biases

  • Artificial Intelligence
  • Technology & Computing

Track hyperparameters, metrics, and model checkpoints across experiments with automated runs and artifact versioning. Automate hyperparameter optimization through sweeps, share findings via interactive reports, and manage production models through a centralized registry.

Sign in to enroll$1032 lessons

What you'll learn

  • W&B RunThe fundamental unit of tracked computation that records metrics, configuration, hardware statistics, source code, and saved files for a single experiment.
  • W&B ArtifactsA versioned, immutable package that stores and tracks files produced or consumed during machine learning workflows with automatic versioning, deduplication, and lineage tracking.
  • W&B Python SDKThe primary programmatic interface to Weights & Biases, distributed as the wandb package, for initializing runs and logging metrics, media, and artifacts.
  • Experiment TrackingThe systematic practice of recording every relevant detail about a machine learning training job — inputs, configuration, outputs, and environment — so results can be reproduced, compared, and understood.
  • Metric LoggingThe act of recording values like loss, accuracy, histograms, and images to the W&B backend during a training run through the wandb.log() function.
  • W&B SweepsA built-in system for automated hyperparameter search that samples configurations, launches runs, and tracks results in a unified workspace.
  • ReproducibilityThe ability to re-run a past experiment and obtain the same result by capturing and restoring every input that influenced the original run including code, configuration, data, environment, and random seeds.
  • W&B InitializationThe process of calling wandb.init() to create a run record, authenticate your machine, establish project context, and start streaming logged data to the W&B backend.
  • Hyperparameter ConfigurationA user-defined setting that controls the training process but is not learned from data, such as learning rate or batch size, captured and stored by wandb.config for reproducibility and comparison.
  • W&B ProjectA named workspace that groups related runs together for comparison, visualization, and collaboration.
  • W&B TablesA structured logging object for recording and visualizing multi-modal data such as model predictions, images, and text aligned row by row in an interactive interface.
  • W&B DashboardAn interactive web-based interface where all logged data in a project is visualized and explored through panels like charts, tables, and media displays that update in real time.
  • W&B WeaveA product extension designed for LLM-based application development that captures prompts, traces of nested LLM calls, and qualitative evaluations.
  • W&B ReportsCollaborative narrative documents that combine live, interactive charts from experiment runs with text, images, and code blocks.
  • LLM Output EvaluationThe systematic process of assessing language model responses against defined criteria or reference answers and recording those assessments as structured, comparable data through scorer functions.
  • Sweep ConfigurationA formal specification in YAML or Python that defines which parameters to vary, their ranges, the search algorithm, and the metric to optimize in a hyperparameter sweep.
  • Model RegistryA workspace-level centralized catalog that manages machine learning models across their full lifecycle, allowing teams to register, assign lifecycle stages, and track model versions from development to production.
  • Run ComparisonThe ability to place multiple training runs side-by-side in the W&B UI to examine how differences in configuration, architecture, or data affect metrics and outputs.
  • W&B CLIA shell-accessible program installed with the wandb Python package that lets you interact with Weights & Biases from a terminal for authentication, run management, artifact operations, and sweep orchestration.
  • Artifact VersioningThe mechanism by which W&B assigns unique sequential identifiers to every saved state of an artifact, with each version being immutable and determined by the content hash of its files.
  • Offline ModeA W&B feature that writes experiment data to local disk instead of streaming to servers in real time, allowing experiment tracking in environments without internet access until data is explicitly synced later.
  • W&B AlertsA notification system that automatically sends email or Slack messages when a training run reaches a user-defined condition.
  • Trace LoggingThe practice of capturing the complete end-to-end call chain of an LLM pipeline with inputs, outputs, and latency at each step.
  • Prompt TrackingThe practice of logging and versioning prompt templates and their variants so that every textual change in LLM application development is recorded, reproducible, and comparable.
  • Team & Access ManagementA workspace-level control system that organizes collaborators across organizations, teams, and projects with structured permission boundaries.
  • Media LoggingThe capability to record non-scalar outputs such as images, audio, video, and 3D point clouds directly to a run for visual inspection in the W&B UI alongside traditional metrics.
  • Artifact LineageThe directed acyclic graph of production and consumption relationships that W&B automatically builds to record how artifacts were produced and consumed across runs, forming an end-to-end provenance record for models and datasets.
  • Custom VisualizationsDomain-specific chart types and layouts configured using Vega-Lite specifications that transform logged data beyond the default line charts to answer specific analysis questions.
  • Run Tagging & NotesTwo lightweight metadata mechanisms that let you annotate individual runs with structured labels (tags) and free-text commentary (notes) to make it practical to search, filter, and understand runs as projects grow.
  • W&B IntegrationA pre-built connector that links Weights & Biases with a specific ML framework to automatically log metrics, gradients, model architecture, and system statistics without manual logging calls.
  • Environment VariablesKey-value pairs maintained by the operating system that W&B uses via `WANDB_*` variables to control authentication and runtime behaviour without embedding values in source code.
  • Search StrategyThe algorithm that a W&B Sweep uses to decide which hyperparameter combination to evaluate next.

About this course

Weights & Biases Overview

What Is Weights & Biases?

Weights & Biases (W&B) is a cloud-based MLOps platform — a suite of tools designed to bring order, reproducibility, and collaboration to the machine learning development lifecycle. If you have ever lost track of which model configuration produced your best results, accidentally overwritten a trained model, or struggled to share experiment results with a colleague, W&B was built to solve exactly those problems.

The name "Weights & Biases" is a nod to the fundamental learnable parameters of a neural network, but the platform serves any machine learning workflow, not just deep learning. At its core, W&B acts as a persistent, searchable record of everything that happens during ML development: what you tried, what worked, what didn't, and what artefacts were produced along the way.


Why MLOps Matters

Training a machine learning model is rarely a one-shot process. In practice, a researcher might run dozens or hundreds of experiments, varying:

  • Hyperparameters — learning rate, batch size, regularisation strength
  • Model architectures — number of layers, activation functions
  • Data preprocessing — normalisation strategies, augmentation pipelines
  • Training duration — number of epochs, early stopping criteria

Without a systematic way to track these variables and their outcomes, progress becomes difficult to reproduce and nearly impossible to share reliably. MLOps (Machine Learning Operations) is the discipline of applying engineering rigour to this process — and W&B is one of the leading platforms providing the tooling to do so.


The Core Components of W&B

W&B is organised around several distinct but interconnected products. Understanding what each one does — and how they relate — gives you a map of the platform before diving into any individual feature.

W&B Platform Runs & Experiment Tracking Artifacts (Data & Models) Sweeps (Hyperparameter Sweeps Hyperparameter Optimisation) Reports (Collaboration & Visualisation) Model Registry & Lineage

The five major components of W&B and how they radiate from a central platform hub. Each component addresses a distinct stage of the ML workflow.

1. Runs and Experiment Tracking

A run is the fundamental unit in W&B — it represents a single execution of your training script. Every time you run an experiment, W&B can automatically capture:

  • Configuration (hyperparameters, seed, architecture choices)
  • Metrics over time (training loss, validation accuracy, custom metrics)
  • System metrics (GPU utilisation, memory usage, CPU load)
  • Output files (model checkpoints, plots, logs)

All runs are stored in a project, where you can compare them side-by-side in an interactive dashboard. This eliminates the need for manual spreadsheets or ad-hoc logging scripts.

2. Artifacts

An artifact in W&B is a versioned, tracked data object — typically a dataset, a model checkpoint, or any file your pipeline produces or consumes. Artifacts solve a critical reproducibility problem: if you retrain a model six months later, you need to know exactly which version of the data was used and which preprocessing steps were applied.

W&B Artifacts provide:

  • Version control for datasets and models (analogous to Git for code)
  • Lineage tracking — a graph showing which runs consumed and produced which artifacts
  • Deduplication — identical files are stored only once, saving storage

3. Sweeps (Hyperparameter Optimisation)

Finding the right hyperparameters is an optimisation problem in its own right. W&B Sweeps automate this search by coordinating multiple runs across a defined search space. You specify the parameters to vary and their ranges, and W&B launches and monitors the search using strategies such as:

  • Grid search — exhaustive evaluation of all combinations
  • Random search — uniform sampling, often surprisingly effective
  • Bayesian optimisation — probabilistic modelling of the objective to focus sampling on promising regions

A sweep agent can run on a single machine or be distributed across many machines, all reporting back to the same W&B project.

4. Reports

Reports are interactive, narrative documents that live inside W&B. They allow you to combine live experiment charts, images, code snippets, and markdown prose into a single shareable document. Reports are useful for:

  • Communicating findings to teammates or stakeholders
  • Creating a reproducible record of an experiment's story
  • Publishing model evaluation summaries

Unlike a static PDF or slide deck, W&B reports stay connected to your live data — charts can be re-rendered as new runs are added.

5. Model Registry

The Model Registry is a centralised catalogue for production-ready models. Once a model has been trained, evaluated, and approved, it can be registered with a semantic version and promoted through stages (e.g., staging → production). This bridges the gap between experimentation and deployment by giving teams a governed, single source of truth for which model is in use and why.


How the Components Fit Together

A typical W&B workflow might look like this:

  1. A dataset is logged as an Artifact (version v1).
  2. A training script runs, consuming that artifact and logging a Run with metrics and config.
  3. A Sweep is launched to find the best learning rate and batch size, spawning many runs automatically.
  4. The best run's model checkpoint is saved as a new Artifact (a trained model, version v1).
  5. The model is promoted to the Model Registry after review.
  6. A Report is written summarising the experiment and shared with collaborators.

Each step links to the others, creating a traceable chain from raw data to deployed model.


Key Concepts to Keep in Mind

TermMeaning
ProjectA collection of related runs, artifacts, and reports
RunOne execution of a training or evaluation script
EntityA W&B user or team that owns projects
ArtifactA versioned, logged file (dataset, model, etc.)
SweepAn automated hyperparameter search across multiple runs
ReportA shareable, interactive document combining prose and live charts

Getting Started

W&B integrates with your existing code through a lightweight Python SDK. At its simplest, you add a few lines to your training script:

import wandb

wandb.init(project="my-project", config={"lr": 0.001, "epochs": 10})

for epoch in range(config.epochs):
    loss = train(...)
    wandb.log({"loss": loss, "epoch": epoch})

wandb.finish()

This minimal instrumentation is enough to capture a fully searchable, visualisable run. From there, each additional W&B feature builds on this foundation, adding versioning, automation, and collaboration capabilities progressively as your needs grow.


Summary

Weights & Biases brings software engineering best practices — version control, automated testing, centralised logging — into the machine learning workflow. Its five core components (Runs, Artifacts, Sweeps, Reports, and the Model Registry) each address a distinct pain point, and together they form a cohesive platform that scales from individual experimentation to team-level ML operations. The following concept documents explore each component in detail.

Weights & Biases — Qlaudia