Linking Weights & Biases as a source
The Weights & Biases connector syncs your ML experiment tracking data into PostHog, including projects, runs, sweeps, reports, and artifact versions across every project in your entity.
The Weights & Biases source is currently in alpha. Per-step run metric history isn't synced – runs include their final summary metrics instead.
Prerequisites
You need a Weights & Biases account and an API key. API keys are personal and grant access to everything your user can see, so consider a service account for team syncs.
Adding a data source
In PostHog, go to the Data pipeline page and select the Sources tab.
Click + New source and then click Link next to Weights & Biases.
Get your API key from wandb.ai/authorize and paste it into the API key field.
Enter the Entity whose projects you want to sync. This is your W&B username or team name, the first segment of your project URLs (
wandb.ai/<entity>/<project>).If you use W&B Dedicated Cloud or a self-managed server, set the Host to your deployment's URL (for example
https://acme.wandb.io). Leave it empty for W&B SaaS cloud.Click Next.
On the next page, select the tables you want to sync and configure the sync method and frequency. Click Import.
Once the sync completes, you can start querying your Weights & Biases data in PostHog.
Configuration
| Option | Type | Required |
|---|---|---|
API key | password | Yes |
Entity (username or team) | text | Yes |
Host (Dedicated Cloud or self-managed only) | text | No |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
projects | A project groups the runs, sweeps, reports and artifacts for one ML workstream within the entity. | Full refresh | — | — |
runs | One row per run across every project in the entity, including config, tags and summary metrics. Incremental syncs filter server-side on createdAt or heartbeatAt; pick heartbeatAt to also pick up state and metric changes on recently active runs | Incremental, Full refresh | createdAt, heartbeatAt | — |
sweeps | A hyperparameter search that launches and coordinates a set of runs. | Full refresh | — | — |
reports | A saved report (workspace view) documenting and visualizing runs in a project. | Full refresh | — | — |
artifacts | One row per artifact version across every project, walked per artifact type and collection. Projects with many run-history artifacts can make this table large | Full refresh | — | — |
Sync details
- Incremental sync – The
runstable supports incremental syncs oncreatedAtorheartbeatAt. PostHog filters server-side, so only matching runs are fetched on each sync. PickheartbeatAtto also pick up state and summary metric changes on recently active runs; acreatedAtcursor only fetches newly created runs. The other tables are full refresh. - JSON columns – Run
config,summaryMetrics, andsystemMetricsare JSON-encoded strings, matching what the W&B API returns. Parse them in queries withJSONExtractfunctions. - Partitioning – Data is partitioned by month on the
createdAtfield. - Pagination – Uses cursor pagination. If a sync is interrupted, it resumes from the last successfully synced page.
- Rate limits – The W&B API allows roughly 50 requests per minute on free plans and 200 on paid plans. PostHog backs off and retries automatically, but very large entities can take a while to sync.
Troubleshooting
- Invalid API key – The key may have been revoked. Generate a new one at wandb.ai/authorize and update the source credentials.
- Tables sync but are empty – Check the entity name. It must match the username or team that owns your projects exactly.