Skip to main content
This page describes how to update the description, metadata, and alias of an existing artifact. Update an artifact when you want to refine its documentation, adjust its metadata, or manage its aliases without creating a new version. To update an artifact from a previously logged run, use the W&B Public API (wandb.Api). To update an artifact while its run is still active, use the wandb.Artifact class and call Artifact.save().
When to use wandb.Artifact.save() or wandb.Run.log_artifact()
  • Use Artifact.save() to update an existing artifact without starting a new run.
  • Use wandb.Run.log_artifact() to create a new artifact and associate it with a specific run.
Choose the approach that matches your workflow. Use the W&B Public API (wandb.Api) to update an artifact outside of a run, or use the wandb.Artifact class while a run is active.
You can’t update the alias of an artifact linked to a model in Model Registry.
The following code example shows how to update the description of an artifact with the wandb.Artifact API:
import wandb

with wandb.init(project="[EXAMPLE]") as run:
    artifact = run.use_artifact("[ARTIFACT-NAME]:[ALIAS]")
    artifact.description = "[DESCRIPTION]"
    artifact.save()