> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-style-guide-models-reports-20260604-104120.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Annotate collections

> Add descriptions and documentation to W&B Registry collections to help users understand their purpose and contents.

Add human-friendly text to your collections to help collaborators and downstream users understand the purpose of the collection and the artifacts it contains.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/wb-21fd5541-style-guide-models-reports-20260604-104120/images/registry/registry_card.gif" alt="Collection card" />
</Frame>

Depending on the collection, you might want to include information about the training data, model architecture, task, license, references, and deployment. The following sections describe topics worth documenting in a collection.

W\&B recommends including at minimum these details:

* **Summary**: The purpose of the collection. The machine learning framework used for the machine learning experiment.
* **License**: The legal terms and permissions associated with the use of the machine learning model. It helps model users understand the legal framework under which they can use the model. Common licenses include Apache 2.0, MIT, and GPL.
* **References**: Citations or references to relevant research papers, datasets, or external resources.

If your collection contains training data, consider including these additional details:

* **Training data**: Describe the training data used.
* **Processing**: Processing done on the training dataset.
* **Data storage**: Where the data is stored and how to access it.

If your collection contains a machine learning model, consider including these additional details:

* **Architecture**: Information about the model architecture, layers, and any specific design choices.
* **Task**: The specific type of task or problem that the collection's model is designed to perform. It's a categorization of the model's intended capability.
* **Deserialize the model**: Provide information on how someone on your team can load the model into memory.
* **Deployment**: Details on how and where the model is deployed and guidance on how the model is integrated into other enterprise systems, such as workflow orchestration platforms.
* **Compare metrics**: Compare metrics across different versions of artifacts linked to the collection. This helps users understand how the model has evolved over time and how different versions perform on specific tasks.

## Add a description to a collection

After you've decided what to document, add a description to the collection so that the information is visible to others. You can add a description interactively through the W\&B Registry or programmatically with the Python SDK.

<Tabs>
  <Tab title="W&B Registry UI">
    1. Navigate to the [W\&B Registry](https://wandb.ai/registry/).
    2. Click a collection.
    3. Select **View details** next to the name of the collection.
    4. Select the **Collection card** tab.
    5. Click the **Edit card** button.
    6. Within the collection card editor, add a description to the collection. You can use Markdown formatting to style your text.

    <Tip>
      Format text with [Markdown markup language](https://www.markdownguide.org/). Use the forward slash (`/`) for a dropdown list of available Markdown formatting options.
    </Tip>
  </Tab>

  <Tab title="Python SDK">
    Use the [`wandb.Api().artifact_collection()`](/models/ref/python/public-api/api#artifact_collection) method to access a collection's description. Use the returned object's `description` property to add or update a description to the collection.

    Specify the collection's type for the `type_name` parameter and the collection's full name for the `name` parameter. A collection's full name prepends the prefix `wandb-registry-` to the registry name, followed by a forward slash and the collection name:

    ```text theme={null}
    wandb-registry-[REGISTRY-NAME]/[COLLECTION-NAME]
    ```

    Copy and paste the following code snippet into your Python script or notebook. Replace `[COLLECTION-TYPE]` with the collection's type and `[COLLECTION-NAME]` with the full name of the collection.

    ```python theme={null}
    import wandb

    api = wandb.Api()

    collection = api.artifact_collection(
      type_name = "[COLLECTION-TYPE]",
      name = "[COLLECTION-NAME]"
      )


    collection.description = "This is a description."
    collection.save()
    ```
  </Tab>
</Tabs>

## Compare metrics across artifact versions

Within the collection card editor, you can compare metrics across different versions of artifacts linked to the collection.

1. Within the collection card editor, type a forward slash (`/`) to open a dropdown list of available Markdown formatting options.
2. Select **Compare metrics** to add a metrics comparison table to the collection card.

The following image shows `val/loss` across 5 different artifact versions linked to the `transaction-risk-model` collection.

<Frame>
  <img src="https://mintcdn.com/wb-21fd5541-style-guide-models-reports-20260604-104120/EcuhgJ3qNHhlU45C/images/registry/compare_linked_artifact_versions.png?fit=max&auto=format&n=EcuhgJ3qNHhlU45C&q=85&s=7cc0e96e05889347a565c2f70dfeab76" alt="Compare and view artifact metrics across versions in collection card" width="2780" height="1896" data-path="images/registry/compare_linked_artifact_versions.png" />
</Frame>
