Migrating to Weights & Biases v0.21.0
Version v0.21.0 introduces 3 breaking changes. This guide details how to update your code.
Released: 7/2/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
wandb.servicewandb.requirex_require_legacy_servicex_disable_setproctitlewandb.Run._metadataArtifact.linkApi.artifactwandb.Api .lengthx_stats_track_process_treex_stats_cpu_countx_stats_cpu_logical_countx_stats_gpu_countx_stats_gpu_typeBreaking Changes
●Issue #1
Removed the legacy implementation of the `service` process; code that relied on the legacy service will now raise an error. Use the new default service implementation.
●Issue #2
The `legacy-service` option of `wandb.require`, as well as the `x_require_legacy_service` and `x_disable_setproctitle` settings and their environment variables have been removed and will raise an error if used.
●Issue #3
Removed the private `wandb.Run._metadata` attribute; override CPU/GPU counts using the new settings `x_stats_cpu_count`, `x_stats_cpu_logical_count`, `x_stats_gpu_count`, and `x_stats_gpu_type`.
Migration Steps
- 1Remove any usage of `wandb.require('legacy-service')` or the `legacy-service` option.
- 2Delete or replace the `x_require_legacy_service` and `x_disable_setproctitle` settings and their corresponding environment variables.
- 3Replace accesses to `wandb.Run._metadata` with the new settings `x_stats_cpu_count`, `x_stats_cpu_logical_count`, `x_stats_gpu_count`, and `x_stats_gpu_type`.
- 4Update code that uses the `.length` attribute on objects from `wandb.Api` to use `len(object)` instead.
- 5If you relied on `Artifact.link()` creating a placeholder run, adjust expectations as it no longer does so.
Release Summary
This release removes the legacy service implementation and related settings, adds new process‑tracking and custom Vega chart‑preset features, deprecates the `.length` attribute, and includes several bug fixes.
Need More Details?
View the full release notes and all changes for Weights & Biases v0.21.0.
View Full Changelog