Skip to main content
Pass desired values to update the description, metadata, and alias of an artifact. Update a run previously logged to W&B with the W&B Public API with (wandb.Api). Use wandb.Run.save() to update an artifact when is first initialized and still active.
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.
Use the W&B Public API (wandb.Api) to update an artifact. Use the wandb.Artifact (wandb.Artifact) Class while a run is active.
You can not update the alias of artifact linked to a model in Model Registry.
The following code example demonstrates how to update the description of an artifact using 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()