You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add diagrams to artifact and run deletion documentation (#1560)
- Added a comprehensive diagram illustrating the artifact garbage
collection process, clarifying the soft-delete mechanism and subsequent
file deletion.
- Introduced a new section detailing the run deletion workflow,
including options for deleting associated artifacts and handling Model
Registry links.
Resolves DOCS-1005
<!-- preview-links-comment -->
📄 **[View preview links for changed
pages](#1560 (comment)
Copy file name to clipboardExpand all lines: content/en/guides/core/artifacts/manage-data/delete-artifacts.md
+54-2Lines changed: 54 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,54 @@ title: Delete an artifact
10
10
11
11
Delete artifacts interactively with the App UI or programmatically with the W&B SDK. When you delete an artifact, W&B marks that artifact as a *soft-delete*. In other words, the artifact is marked for deletion but files are not immediately deleted from storage.
12
12
13
-
The contents of the artifact remain as a soft-delete, or pending deletion state, until a regularly run garbage collection process reviews all artifacts marked for deletion. The garbage collection process deletes associated files from storage if the artifact and its associated files are not used by a previous or subsequent artifact versions.
13
+
The contents of the artifact remain as a soft-delete, or pending deletion state, until a regularly run garbage collection process reviews all artifacts marked for deletion. The garbage collection process deletes associated files from storage if the artifact and its associated files are not used by a previous or subsequent artifact versions.
14
+
15
+
## Artifact garbage collection workflow
16
+
17
+
The following diagram illustrates the complete artifact garbage collection process:
style End fill:#e0e0e0,stroke:#333,stroke-width:2px,color:#000
49
+
```
14
50
15
51
The sections in this page describe how to delete specific artifact versions, how to delete an artifact collection, how to delete artifacts with and without aliases, and more. You can schedule when artifacts are deleted from W&B with TTL policies. For more information, see [Manage data retention with Artifact TTL policy]({{< relref "./ttl.md" >}}).
16
52
17
53
{{% alert %}}
18
54
Artifacts that are scheduled for deletion with a TTL policy, deleted with the W&B SDK, or deleted with the W&B App UI are first soft-deleted. Artifacts that are soft deleted undergo garbage collection before they are hard-deleted.
19
55
{{% /alert %}}
20
56
57
+
{{% alert %}}
58
+
Deleting an entity, project, or artifact collection will also trigger the artifact deletion process described on this page. When deleting a run, if you choose to delete associated artifacts, those artifacts will follow the same soft-delete and garbage collection workflow.
59
+
{{% /alert %}}
60
+
21
61
### Delete an artifact version
22
62
23
63
To delete an artifact version:
@@ -27,7 +67,7 @@ To delete an artifact version:
27
67
3. On the right hand side of the workspace, select the kebab dropdown.
28
68
4. Choose Delete.
29
69
30
-
An artifact version can also be deleted programatically via the [delete()]({{< relref "/ref/python/sdk/classes/artifact.md#delete" >}}) method. See the examples below.
70
+
An artifact version can also be deleted programmatically via the [delete()]({{< relref "/ref/python/sdk/classes/artifact.md#delete" >}}) method. See the examples below.
31
71
32
72
### Delete multiple artifact versions with aliases
33
73
@@ -71,6 +111,18 @@ for artifact_version in runs.logged_artifacts():
71
111
artifact.delete(delete_aliases=True)
72
112
```
73
113
114
+
### Protected aliases and deletion permissions
115
+
116
+
Artifacts with protected aliases have special deletion restrictions. [Protected aliases]({{< relref "/guides/core/registry/model_registry/access_controls.md" >}}) are aliases in the Model Registry that registry admins can set to prevent unauthorized deletion.
117
+
118
+
{{% alert %}}
119
+
**Important considerations for protected aliases:**
120
+
- Artifacts with protected aliases cannot be deleted by non-registry admins
121
+
- Within a registry, registry admins can unlink protected artifact versions and delete collections/registries that contain protected aliases
122
+
- For source artifacts: if a source artifact is linked to a registry with a protected alias, it cannot be deleted by any user
123
+
- Registry admins can remove the protected aliases from source artifacts and then delete them
124
+
{{% /alert %}}
125
+
74
126
### Delete all versions of an artifact that do not have an alias
75
127
76
128
The following code snippet demonstrates how to delete all versions of an artifact that do not have an alias. Provide the name of the project and entity for the `project` and `entity` keys in `wandb.Api`, respectively. Replace the `<>` with the name of your artifact:
Copy file name to clipboardExpand all lines: content/en/guides/models/track/runs/_index.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -536,6 +536,46 @@ Once a run with a specific ID is deleted, its ID may not be used again. Trying t
536
536
For projects that contain a large number of runs, you can use either the search bar to filter runs you want to delete using Regex or the filter button to filter runs based on their status, tags, or other properties.
537
537
{{% /alert %}}
538
538
539
+
### Run deletion workflow
540
+
541
+
The following diagram illustrates the complete run deletion process, including the handling of associated artifacts and Model Registry links:
When you delete a run and choose to delete associated artifacts, the artifacts are permanently removed and can't be recovered, even if the run is restored later. This includes models linked to the Model Registry.
577
+
{{% /alert %}}
578
+
539
579
## Organize runs
540
580
541
581
This section provides instructions on how to organize runs using groups and job types. By assigning runs to groups (for example, experiment names) and specifying job types (for example, preprocessing, training, evaluation, debugging), you can streamline your workflow and improve model comparison.
@@ -547,7 +587,7 @@ Each run in W&B can be categorized by **group** and a **job type**:
547
587
-**Group**: a broad category for the experiment, used to organize and filter runs.
548
588
-**Job type**: the function of the run, such as `preprocessing`, `training`, or `evaluation`.
549
589
550
-
The proceeding [example workspace](https://wandb.ai/stacey/model_iterz?workspace=user-stacey), trains a baseline model using increasing amounts of data from the Fashion-MNIST dataset. The workspace uses colorts to represent the amount of data used:
590
+
The proceeding [example workspace](https://wandb.ai/stacey/model_iterz?workspace=user-stacey), trains a baseline model using increasing amounts of data from the Fashion-MNIST dataset. The workspace uses colors to represent the amount of data used:
551
591
552
592
-**Yellow to dark green** indicate increasing amounts of data for the baseline model.
553
593
-**Light blue to violet to magenta** indicate amounts of data for a more complex "double" model with additional parameters.
0 commit comments