question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot retrieve model versions in the Model Registry

See original GitHub issue

I’m unable to retrieve the versions of an artifact on the Model Registry. The same code works in a regular wandb projects but doesn’t work for the model-registry. It doesn’t understand the model_type to be valid.

Within the original project where this model has been linked from, the command does work (with the same model type).

image

Screenshot 2022-11-22 at 12 25 07

Trace:

ValueError                                Traceback (most recent call last)
/databricks/python/lib/python3.8/site-packages/wandb/apis/normalize.py in wrapper(*args, **kwargs)
     24         try:
---> 25             return func(*args, **kwargs)
     26         except requests.HTTPError as err:

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in artifact_versions(self, type_name, name, per_page)
    892         artifact_type = ArtifactType(self.client, entity, project, type_name)
--> 893         return artifact_type.collection(collection_name).versions(per_page=per_page)
    894 

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in collection(self, name)
   3718     def collection(self, name):
-> 3719         return ArtifactCollection(
   3720             self.client, self.entity, self.project, name, self.type

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in __init__(self, client, entity, project, name, type, attrs)
   3735         if self._attrs is None:
-> 3736             self.load()
   3737 

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in load(self)
   3790         ):
-> 3791             raise ValueError("Could not find artifact type %s" % self.type)
   3792         self._attrs = response["project"]["artifactType"]["artifactSequence"]

ValueError: Could not find artifact type model

During handling of the above exception, another exception occurred:

CommError                                 Traceback (most recent call last)
<ipython-input-115-d4f262d7ee43> in <module>
      4 artifact_type = "model"
      5 
----> 6 artifact_vers = api.artifact_versions(artifact_type, 'util-co/model-registry/relationship-classification')
      7 
      8 for version in artifact_vers:

/databricks/python/lib/python3.8/site-packages/wandb/apis/normalize.py in wrapper(*args, **kwargs)
     59                 raise
     60             else:
---> 61                 raise CommError(message, err).with_traceback(sys.exc_info()[2])
     62 
     63     return wrapper

/databricks/python/lib/python3.8/site-packages/wandb/apis/normalize.py in wrapper(*args, **kwargs)
     23         message = "Whoa, you found a bug."
     24         try:
---> 25             return func(*args, **kwargs)
     26         except requests.HTTPError as err:
     27             raise CommError(err.response, err)

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in artifact_versions(self, type_name, name, per_page)
    891         entity, project, collection_name = self._parse_artifact_path(name)
    892         artifact_type = ArtifactType(self.client, entity, project, type_name)
--> 893         return artifact_type.collection(collection_name).versions(per_page=per_page)
    894 
    895     @normalize_exceptions

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in collection(self, name)
   3717 
   3718     def collection(self, name):
-> 3719         return ArtifactCollection(
   3720             self.client, self.entity, self.project, name, self.type
   3721         )

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in __init__(self, client, entity, project, name, type, attrs)
   3734         self._attrs = attrs
   3735         if self._attrs is None:
-> 3736             self.load()
   3737 
   3738     @property

/databricks/python/lib/python3.8/site-packages/wandb/apis/public.py in load(self)
   3789             or response["project"]["artifactType"].get("artifactSequence") is None
   3790         ):
-> 3791             raise ValueError("Could not find artifact type %s" % self.type)
   3792         self._attrs = response["project"]["artifactType"]["artifactSequence"]
   3793         return self._attrs

CommError: Could not find artifact type model

_Originally posted by @kayvane1 in https://github.com/wandb/wandb/issues/4359#issuecomment-1323596975_

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vwrjcommented, Nov 23, 2022

Hi @kayvane1, thanks for flagging! We’ll get a fix out for this.

0reactions
MBakirWBcommented, Dec 1, 2022

@kayvane1, thank you for the update and informing us the fix worked. Wandb release cycles are typically every 2-3 weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Register and Deploy Models with Model Registry
With the SageMaker model registry you can catalog models for production, manage model versions, associate metadata, and manage the approval status of a ......
Read more >
[Q] Model registry | How to list all model versions? · Issue #4359
Is there a way I can get a list of all the available versions through the API ... Cannot retrieve model versions in...
Read more >
MLflow Model Registry on Databricks
Model version page · Click a version name in the Latest Version column on the registered models page. · Click a version name...
Read more >
MLflow Model Registry
On the version detail page you can see model version details and the current stage of the model version. Click the Stage drop-down...
Read more >
ML Model Registry: What It Is, Why It Matters, How to ...
Where can we find the best version of this model so we can audit, test, deploy, or reuse it? How was this model...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found