Skip to content

Commit 33c5d6f

Browse files
docs: clarify update-artifact wording (DOCS-1215) (#2329)
## Summary Updates [Update an artifact](https://docs.wandb.ai/models/artifacts/update-an-artifact) to avoid vague "inside/outside a run" language. The page now contrasts **while a run is active** with **Public API only** (no `wandb.init()`), renames the second tab accordingly, and tightens the intro and guidance paragraphs. ## Test plan - [ ] `mint broken-links` (optional) - [ ] Spot-check the page in Mintlify preview Resolves DOCS-1215 Made with [Cursor](https://cursor.com) --------- Co-authored-by: Noah Luna <15202580+ngrayluna@users.noreply.github.com>
1 parent ad56cca commit 33c5d6f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

models/artifacts/update-an-artifact.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
description: Update an existing Artifact inside and outside of a W&B Run.
2+
description: Update an existing artifact while a run is active or using only the Public API.
33
title: Update an artifact
44
---
55

6-
Pass desired values to update the `description`, `metadata`, and `alias` of an artifact. Call the `save()` method to update the artifact on the W&B servers. You can update an artifact during a W&B Run or outside of a Run.
6+
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`](/models/ref/python/public-api/api)). Use `wandb.Run.save()` to update an artifact when is first initialized and still active.
77

88
<Note>
9-
**When to use Artifact.save() or wandb.Run.log_artifact()**
9+
**When to use wandb.Artifact.save() or wandb.Run.log_artifact()**
1010

11-
- Use `Artifact.save()` to update an existing artifact without creating a new run.
11+
- Use `Artifact.save()` to update an existing artifact without starting a new run.
1212
- Use `wandb.Run.log_artifact()` to create a new artifact and associate it with a specific run.
1313
</Note>
1414

15-
Use the W&B Public API ([`wandb.Api`](/models/ref/python/public-api/api)) to update an artifact outside of a run. Use the Artifact API ([`wandb.Artifact`](/models/ref/python/experiments/artifact)) to update an artifact during a run.
15+
Use the W&B Public API ([`wandb.Api`](/models/ref/python/public-api/api)) to update an artifact. Use the wandb.Artifact ([`wandb.Artifact`](/models/ref/python/experiments/artifact)) Class while a run is active.
1616

1717
<Warning>
1818
You can not update the alias of artifact linked to a model in Model Registry.
@@ -31,8 +31,8 @@ with wandb.init(project="<example>") as run:
3131
artifact.save()
3232
```
3333
</Tab>
34-
<Tab title="Outside of a run">
35-
The following code example demonstrates how to update the description of an artifact using the `wandb.Api` API:
34+
<Tab title="W&B Public API">
35+
The following example updates an artifact with [`wandb.Api`](/models/ref/python/public-api/api):
3636

3737
```python
3838
import wandb

0 commit comments

Comments
 (0)