# Unable to retrieve metadata from model registry

**URL:** <https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989>\
**Category:** W&B Help\
**Created:** [September 25, 2024, 4:29am UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989 "2024-09-25T04:29:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![muqtasid87](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@muqtasid87](https://community.wandb.ai/u/muqtasid87)\
**Post date:** [September 25, 2024, 4:29am UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/1 "2024-09-25T04:29:11Z")

</div>

I have some models saved to the Model Registry and I’m trying to access the Metadata however it’s only returning an empty dictionary. (I do have metadata saved to the models and they can be viewed from the web gui)

Code i’m using:

```auto
api = wandb.Api()
artifact = api.artifact('your-entity/wandb-registry-model/collection:latest') 
metadata = artifact.metadata
print(metadata)

```

I’ve also tried

```auto
run = wandb.init()
latest = run.use_artifact('your-entity/wandb-registry-model/collection:latest', type='model')
print(latest.metadata)

```

Both give the same empty dict output:

```auto
{}

```

However I can access other attributes such as artifact.name or artifact.aliases but not artifact.metadata

---

<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:** [September 25, 2024, 6:27pm UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/2 "2024-09-25T18:27:32Z")

</div>

Hi Muqtasid:  
Thank you for writing in! I’m wondering how you defined some metadata when you logged the artifact? Sharing the source code for reference, the artifact’s user\_defined metadata is queryble. Could you share me a code snippet of how you init the artifact and it’s metadata?  
Best, W&B

---

<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:** [September 30, 2024, 1:52pm UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/3 "2024-09-30T13:52:02Z")

</div>

Hi Muqtasid,

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:** ![muqtasid87](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@muqtasid87](https://community.wandb.ai/u/muqtasid87)\
**Post date:** [October 2, 2024, 5:13am UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/4 "2024-10-02T05:13:17Z")

</div>

this is how im initiating the run, im not adding any metadata to the init, but I’m using the ultralytics integration of wandb which is logging the metadata for each of the runs

```auto
   run = wandb.init(
                project="toll_booth", 
                name=f"experiment_{read_exp_num()}",
                id = f"experiment_{read_exp_num()}",
                config={
                    "epochs": self.no_epochs,
                    "batch_size": self.batch_size,
                    "weight_name": self.weight_name,
                    "data_path": self.data_path
                },
                job_type="training"
            )

```

---

<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:** [October 2, 2024, 2:42pm UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/5 "2024-10-02T14:42:25Z")

</div>

Hi Muqtasid:  
Have you had any success in the past using ultralytics integration of wandb and retrieved metadata?  
Best, W&B

---

<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:** [October 4, 2024, 4:43pm UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/6 "2024-10-04T16:43:17Z")

</div>

Hi Muqtasid,

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:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [October 7, 2024, 7:44pm UTC](https://community.wandb.ai/t/unable-to-retrieve-metadata-from-model-registry/7989/7 "2024-10-07T19:44:15Z")

</div>

Hi Muqtasid, 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!
