W&B integrates with Databricks by customizing the W&B Jupyter notebook experience in the Databricks environment. This page shows you how to install and authenticate W&B on a Databricks cluster so that you can track experiments and log metrics from notebooks running on Spark.Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-style-guide-models-integrations-20260527-015516.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Configure Databricks
To use W&B from a Databricks notebook, you must install thewandb package on the cluster and configure authentication so your notebooks can log to W&B.
-
Install
wandbin the cluster In your cluster configuration, choose your cluster, then click Libraries > Install New > PyPI, and add the packagewandb. -
Set up authentication
To authenticate your W&B account, add a Databricks secret that your notebooks can query at runtime. This avoids hard-coding your API key in notebooks.
Examples
The following examples show how to use the preceding secret to log in and begin logging from a Databricks notebook.Basic example
Sweeps
Notebooks that usewandb.sweep() or wandb.agent() must set the entity and project as environment variables: