Skip to content

Upgrading wandb 0.20 to 0.21

Breaking0.20.1 → 0.21.4Breaking5Deprecated2New10Changed10Fixed17

BreakingUpgrade verdict

5 breaking changes.

  • Linking an artifact used to hide failures and return nothing. Now failures raise errors, so code that ignored the result may need updating.
  • Removes the __bool__ implementation for registry iterators to align with Python lazy iterators.
  • The old way the package ran its background helper process is gone, so setups relying on it will stop working.
  • The old service implementation and its related options are gone; using them now raises an error.
Top 5 of 7 that need code or config changes

Drops psutil, setproctitle.

Installs 19 packages in all (was 21).

Breaking5
Errors during Artifact.link() or Run.link_artifact() are no longer suppressed, and these methods no longer return None.
Artifact.link()Run.link_artifact()
Removes the __bool__ implementation for registry iterators to align with Python lazy iterators.
__bool__
Removes the legacy implementation of the service process.
service
Removes the legacy service process, the legacy-service option of wandb.require, and related settings and env vars, which now raise an error.
servicewandb.requirelegacy-servicex_require_legacy_servicex_disable_setproctitle
Removes the private wandb.Run._metadata attribute; use the new x_stats_{cpu_count,cpu_logical_count,gpu_count,gpu_type} settings instead.
wandb.Run._metadatax_stats_cpu_countx_stats_cpu_logical_countx_stats_gpu_countx_stats_gpu_type
Deprecated2
Deprecates the wandb.beta.workflows module and its contents, including log_model(), use_model(), and link_model().
wandb.beta.workflowslog_model()use_model()link_model()
Deprecates .length for objects queried from wandb.Api; use len(...) instead.
wandb.Api.lengthlen()