Skip to main content
Use aliases to reference a specific artifact version in W&B Registry. Aliases provide stable, human-readable labels for versions that are current, in production, or otherwise important. W&B automatically assigns aliases to each artifact you link with the same name. You can also create custom aliases and use protected aliases to safeguard important versions. Aliases appear as rectangles with the name of that alias in the rectangle in the Registry UI. If an alias is protected, it appears as a gray rectangle with a lock icon. Otherwise, the alias appears as an orange rectangle. Aliases aren’t shared across registries.
When to use an alias versus using a tagUse an alias to reference a specific artifact version. Each alias within a collection is unique. Only one artifact version can have a specific alias at a time.Use tags to organize and group artifact versions or collections based on a common theme. Multiple artifact versions and collections can share the same tag.
When you add an alias to an artifact version, you can optionally start a Registry automation to notify a Slack channel or trigger a webhook. If the automation calls a webhook that needs an access token or other sensitive value in the request, store those strings as team secrets and select them when you configure the webhook for the automation.

Default aliases

W&B automatically assigns the following aliases to each artifact version you link with the same name:
  • The latest alias to the most recent artifact version you link to a collection.
  • A unique version number. W&B counts each artifact version (zero indexing) you link. W&B uses the count number to assign a unique version number to that artifact.
For example, if you link an artifact named zoo_model three times, W&B creates three aliases v0, v1, and v2 respectively. v2 also has the latest alias.

Custom aliases

Use custom aliases to label artifact versions by workflow, dataset, performance, or other criteria. For example:
  • You might use aliases such as dataset_version_v0, dataset_version_v1, and dataset_version_v2 to identify which dataset a model was trained on.
  • You might use a best_model alias to keep track of the best performing artifact model version.
Any user with a Member or Admin registry role on a registry can add or remove a custom alias from a linked artifact in that registry. Users with the Restricted Viewer or Viewer roles can’t add or remove aliases.
Protected aliases provide a way to label and identify which artifact versions to protect from modification or deletion.
You can create a custom alias with the W&B Registry or the Python SDK. Click the tab that fits your workflow.
  1. Navigate to the W&B Registry.
  2. Click the View details button in a collection.
  3. Within the Versions section, click the View button for a specific artifact version.
  4. Click the + button to add one or more aliases next to the Aliases field.

Protected aliases

Use a protected alias to identify an artifact version and prevent it from being modified or deleted. Protected aliases are useful for versions that downstream systems depend on. For example, use a production protected alias for artifact versions used in your organization’s production ML pipeline. Registry admin users and service accounts with the Admin role can create protected aliases and add or remove protected aliases from an artifact version. Users and service accounts with Member, Viewer, and Restricted Viewer roles can’t unlink a protected version or delete a collection that contains a protected alias. See Configure registry access for details. Common protected aliases include:
  • Production: The artifact version is ready for production use.
  • Staging: The artifact version is ready for testing.

Create a protected alias

The following steps describe how to create a protected alias in the W&B Registry UI:
  1. Navigate to the W&B Registry.
  2. Select a registry.
  3. Click the gear button on the top right of the page to view the registry’s settings.
  4. Within the Protected Aliases section, click the + button to add one or more protected aliases.
After creation, each protected alias appears as a gray rectangle with a lock icon in the Protected Aliases section.
Unlike custom aliases that aren’t protected, you can create protected aliases only in the W&B Registry UI, not programmatically with the Python SDK. To add a protected alias to an artifact version, you can use the W&B Registry UI or the Python SDK.
The following steps describe how to add a protected alias to an artifact version with the W&B Registry UI:
  1. Navigate to the W&B Registry.
  2. Click the View details button in a collection.
  3. Within the Versions section, select the View button for a specific artifact version.
  4. Click the + button to add one or more protected aliases next to the Aliases field.
After an admin creates a protected alias, it can be added to an artifact version either in the UI or programmatically with the Python SDK. See Custom aliases.

Find existing aliases

You can find aliases with the global search bar in the W&B Registry. To find a protected alias:
  1. Navigate to the W&B Registry.
  2. Specify the search term in the search bar at the top of the page. Press Enter to search.
Search results appear below the search bar if the term you specify matches an existing registry, collection name, artifact version tag, collection tag, or alias.

Example

The following end-to-end example shows how to create an artifact, link it to a registry collection, and attach custom aliases in a single workflow.
The following code example is a continuation of this W&B Registry Tutorial notebook. To use the following code, you must first retrieve and process the Zoo dataset as described in the notebook. Once you have the Zoo dataset, you can create an artifact version and add custom aliases to it.
The following code snippet shows how to create an artifact version and add custom aliases to it. The example uses the Zoo dataset from the UCI Machine Learning Repository and the Model collection in the Zoo_Classifier_Models registry.
  1. First, you create an artifact object (wandb.Artifact()).
  2. Next, you add two dataset PyTorch tensors to the artifact object with wandb.Artifact.add_file().
  3. Finally, you link the artifact version to the Model collection in the Zoo_Classifier_Models registry with link_artifact(). You also add two custom aliases to the artifact version by passing production-us and production-eu as arguments to the aliases parameter.