# Wandb.link\_model and metadata

**URL:** <https://community.wandb.ai/t/wandb-link-model-and-metadata/6837>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [June 3, 2024, 2:13pm UTC](https://community.wandb.ai/t/wandb-link-model-and-metadata/6837 "2024-06-03T14:13:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pozimeksg](https://avatars.discourse-cdn.com/v4/letter/p/e19adc/32.png) [@pozimeksg](https://community.wandb.ai/u/pozimeksg)\
**Post date:** [June 3, 2024, 2:13pm UTC](https://community.wandb.ai/t/wandb-link-model-and-metadata/6837/1 "2024-06-03T14:13:29Z")

</div>

Inside the Model Registry app each model version has an associated `Metadata` tab in the UI where the user can see information related to the specific model. It’s a useful feature, but it has issues:

- The [API reference](https://docs.wandb.ai/ref/python/run#link_model) for `link_model` doesn’t say anything about how to populate the `Metadata` tab when linking a model. The guide also didn’t make this really clear.
- From what I’ve gathered the only way to programmatically populate `Metadata` is to include a `.yaml` file in the directory pointed to by the `path` argument. This is really inconvenient - can the `link_model` function be updated accept an optional `metadata` kwarg of type `dict`?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [June 3, 2024, 2:19pm UTC](https://community.wandb.ai/t/wandb-link-model-and-metadata/6837/2 "2024-06-03T14:19:11Z")

</div>

Hello, This a reply from our support bot designed to assist you with your Weights & Biases related queries. To reach a human please reply to this message.

The Weights & Biases Model Registry provides a comprehensive way to manage the lifecycle of your models, from training to production. Within the Model Registry, each model version has an associated `Metadata` tab in the UI, which displays information related to that specific model version. However, based on the provided documentation, there isn’t a direct mention of how to programmatically populate the `Metadata` tab through the `link_model` function or any other function with a `metadata` keyword argument.

The current method to include metadata for a model version involves adding a `.yaml` file in the directory that you’re pointing to with the `path` argument when you’re creating or linking a model artifact. This `.yaml` file should contain the metadata you wish to associate with the model version. When the model artifact is created or linked, the contents of the `.yaml` file are automatically recognized and displayed in the `Metadata` tab in the UI.

Your suggestion to update the `link_model` function (or a similar function within the W&B SDK) to accept an optional `metadata` keyword argument of type `dict` is insightful. This would indeed streamline the process of associating metadata with model versions by allowing users to specify metadata programmatically at the time of linking the model, rather than having to rely on a separate `.yaml` file.

As of the information available in the provided documentation, there isn’t a direct API call or function parameter that supports this functionality. For enhancements or feature requests like this, it’s best to reach out directly to the Weights & Biases support team or submit a feature request through their community forums or GitHub repository. The W&B team is very receptive to user feedback and continuously works on improving their platform based on user needs.

For now, to programmatically include metadata with your model versions, you would need to follow the workaround of including a `.yaml` file with the desired metadata in your model’s directory. If you’re looking for more detailed guidance or have further questions, I recommend contacting W&B support at [support@wandb.com](mailto:support@wandb.com) or exploring the community forums at [https://wandb.me/community](https://wandb.me/community) for more insights and updates on this feature.

To reach a human please reply to this message.

-WandBot 🤖

---

<div class="post-metadata">

**Author:** ![jason-arkens17](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason-arkens17](https://community.wandb.ai/u/jason-arkens17)\
**Post date:** [June 11, 2024, 4:54pm UTC](https://community.wandb.ai/t/wandb-link-model-and-metadata/6837/3 "2024-06-11T16:54:37Z")

</div>

Hi Piotr,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,  
Weights & Biases

---

<div class="post-metadata">

**Author:** ![jason-arkens17](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jason-arkens17](https://community.wandb.ai/u/jason-arkens17)\
**Post date:** [June 12, 2024, 11:16pm UTC](https://community.wandb.ai/t/wandb-link-model-and-metadata/6837/4 "2024-06-12T23:16:41Z")

</div>

Hi Piotr, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!
