diff --git a/docs/guides/registry/intro.md b/docs/guides/registry/intro.md index 3a46d9b68..2a0356f93 100644 --- a/docs/guides/registry/intro.md +++ b/docs/guides/registry/intro.md @@ -3,54 +3,98 @@ slug: /guides/registry displayed_sidebar: default title: Registry --- +import { CTAButtons } from '@site/src/components/CTAButtons/CTAButtons.tsx'; + + + :::info -W&B Registry is now in public preview. Visit [this](#enable-wb-registry) section to learn how to enable it for your deployment type. +W&B Registry is in public preview. See [this](#enable-wb-registry) section to learn how to enable it for your deployment type. ::: -W&B Registry is a curated central repository that stores and provides versioning, aliases, lineage tracking, and governance of models and datasets. Registry allows individuals and teams across the entire organization to share and collaboratively manage the lifecycle of all models, datasets and other artifacts. As the single source of truth for which models are in production, Registry provides the foundation for an effective CI/CD pipeline by identifying the right models to reproduce, retrain, evaluate, and deploy. + +W&B Registry is a curated central repository of [artifact](../artifacts/intro.md) versions within your organization. Users who [have permission](./configure_registry.md) within your organization can [download](./download_use_artifact.md), share, and collaboratively manage the lifecycle of all artifacts, regardless of the team that user belongs to. + +You can use the Registry to [track artifact versions](./link_version.md), audit the history of an artifact's usage and changes, ensure governance and compliance of your artifacts, and [automate downstream processes such as model CI/CD](../automations/intro.md). + +In summary, use W&B Registry to: + +- [Promote](./link_version.md) artifact versions that satisfy a machine learning task to other users in your organization. +- Organize [artifacts with tags](./organize-with-tags.md) so that you can find or reference specific artifacts. +- Track an [artifact’s lineage](../model_registry/model-lineage.md) and audit the history of changes. +- [Automate](../model_registry/model-registry-automations.md) downstream processes such as model CI/CD. +- [Limit who in your organization](./configure_registry.md) can access artifacts in each registry. + + ![](/images/registry/registry_landing_page.png) -Use W&B Registry to: +The preceding image shows the Registry App with "Model" and "Dataset" core registries along with custom registries. -- [Bookmark](./link_version.md) your best artifacts for each machine learning task. -- [Automate](../model_registry/model-registry-automations.md) downstream processes and model CI/CD. -- Track an [artifact’s lineage](../model_registry/model-lineage.md) and audit the history of changes to production artifacts. -- [Configure](./configure_registry.md) viewer, member, or administrator access to a registry for all organization users. -- Quickly find or reference important artifacts with a unique identifier known as aliases. -- Use [tags](./organize-with-tags.md) to label, group, and discover assets in your Registry. -## How it works +## Learn the basics +Each organization initially contains two registries that you can use to organize your model and dataset artifacts called "Models" and "Datasets", respectively. You can create [additional registries to organize other artifact types based on your organization's needs](./registry_types.md). + +Each [registry](./configure_registry.md) consists of one or more [collections](./create_collection.md). Each collection represents a distinct task or use case. + +![](/images/registry/homepage_registry.png) + +To add an artifact to a registry, you first log a [specific artifact version to W&B](../artifacts/create-a-new-artifact-version.md). Each time you log an artifact, W&B automatically assigns a version to that artifact. Artifact versions use 0 indexing, so the first version is `v0`, the second version is `v1`, and so on. + +Once you log an artifact to W&B, you can then link that specific artifact version to a collection in the registry. + +:::info +The term "link" refers to pointers that connect where W&B stores the artifact and where the artifact is accessible in the registry. W&B does not duplicate artifacts when you link an artifact to a collection. +::: -Track and publish your staged artifacts to W&B Registry in a few steps: +As an example, the proceeding code example shows how to log and link a fake model artifact called "my_model.txt" to a collection named "first-collection" in the [core Model registry](./registry_types.md). More specifically, the code accomplishes the following: -1. Log an artifact version: In your training or experiment script, add a few lines of code to save the artifact to a W&B run. -2. Link to registry: Bookmark the most relevant and valuable artifact version by linking it to a registry. +1. Initialize a W&B run. +2. Log the artifact to W&B. +3. Specify the name of the collection and registry you want to link your artifact version to. +4. Link the artifact to the collection. -The following code snippet demonstrates how to log and link a model to the model registry inside W&B Registry: +Copy and paste the proceeding code snippet into a Python script and run it. Ensure that you have W&B Python SDK version 0.18.6 or greater. -```python +```python title="hello_collection.py" import wandb import random -# Start a new W&B run to track your experiment +# Initialize a W&B run to track the artifact run = wandb.init(project="registry_quickstart") -# Simulate logging model metrics -run.log({"acc": random.random()}) - -# Create a simulated model file +# Create a simulated model file so that you can log it with open("my_model.txt", "w") as f: f.write("Model: " + str(random.random())) -# log and link the model to the model registry inside W&B Registry -logged_artifact = run.log_artifact(artifact_or_path="./my_model.txt", name="gemma-finetuned-3twsov9e", type="model") -run.link_artifact(artifact=logged_artifact, target_path=f"/wandb-registry-model/registry-quickstart-collection"), - -run.finish() +# Log the artifact to W&B +logged_artifact = run.log_artifact( + artifact_or_path="./my_model.txt", + name="gemma-finetuned", + type="model" # Specifies artifact type +) + +# Specify the name of the collection and registry +# you want to publish the artifact to +COLLECTION_NAME = "first-collection" +REGISTRY_NAME = "model" + +# Link the artifact to the registry +run.link_artifact( + artifact=logged_artifact, + target_path=f"wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}" +) ``` -See learn more about linking to a registry, visit [this](/guides/registry/link_version) guide. + +W&B automatically creates a collection for you if the collection you specify in the returned run object's `link_artifact(target_path = "")` method does not exist within the registry you specify. + +:::info +The URL that your terminal prints directs you to the project where W&B stores your artifact. +::: + +Navigate to the Registry App to view artifact versions that you and other members of your organization publish. To do so, first navigate to W&B. Select **Registry** in the left sidebar below **Applications**. Select the "Model" registry. Within the registry, you should see the "first-collection" collection with your linked artifact version. + +Once you link an artifact version to a collection within a registry, members of your organization can view, download, and manage your artifact versions, create downstream automations, and more if they have the proper permissions. ## Enable W&B Registry @@ -72,9 +116,11 @@ Depending on your use case, explore the following resources to get started with * Take the W&B [Model CI/CD](https://www.wandb.courses/courses/enterprise-model-management) course and learn how to: * Use W&B Registry to manage and version your artifacts, track lineage, and promote models through different lifecycle stages. * Automate your model management workflows using webhooks. - * See how Registry integrates with external ML systems and tools in your model development lifecycle for model evaluation, monitoring, and deployment. + * Integrate the registry with external ML systems and tools for model evaluation, monitoring, and deployment. + -## Migrating from the legacy Model Registry to W&B Registry + +## Migrate from the legacy Model Registry to W&B Registry The legacy Model Registry is scheduled for deprecation with the exact date not yet decided. Before deprecating the legacy Model Registry, W&B will migrate the contents of the legacy Model Registry to the W&B Registry. @@ -90,6 +136,4 @@ To view the legacy Model Registry, navigate to the Model Registry in the W&B App ::: -Reach out to support@wandb.com with any questions or to speak to the W&B Product Team about any concerns about the migration. - - +Reach out to support@wandb.com with any questions or to speak to the W&B Product Team about any concerns about the migration. \ No newline at end of file diff --git a/docs/guides/registry/model_registry_eol.md b/docs/guides/registry/model_registry_eol.md index ded743022..e6d06fa0e 100644 --- a/docs/guides/registry/model_registry_eol.md +++ b/docs/guides/registry/model_registry_eol.md @@ -7,12 +7,20 @@ W&B will transition assets from the legacy [W&B Model Registry](../model_registr The transition will take place once the new W&B Registry includes all the functionalities currently available in the Model Registry. W&B will attempt to preserve current workflows, codebases, and references. +Until the migration occurs, W&B supports both the legacy Model Registry and the new Registry. + This guide is a living document and will be updated regularly as more information becomes available. For any questions or support, contact support@wandb.com. ## How W&B Registry differs from the legacy Model Registry W&B Registry introduces a range of new features and enhancements designed to provide a more robust and flexible environment for managing models, datasets, and other artifacts. +:::info +To view the legacy Model Registry, navigate to the Model Registry in the W&B App. A banner appears at the top of the page that enables you to use the legacy Model Registry App UI. + +![](/images/registry/nav_to_old_model_reg.gif) +::: + ### Organizational visibility Artifacts linked to the legacy Model Registry have team level visibility. This means that only members of your team can view your artifacts in the legacy W&B Model Registry. W&B Registry has organization level visibility. This means that members across an organization, with correct permissions, can view artifacts linked to a registry. diff --git a/static/images/registry/homepage_registry.png b/static/images/registry/homepage_registry.png new file mode 100644 index 000000000..fb6d04024 Binary files /dev/null and b/static/images/registry/homepage_registry.png differ