Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hey Folks, Trying To Use The Model Class From The Clearml Sdk And Seeing Some Weird Errors. I Am Loading A Model This Way And Trying To See A Metadata Value For The Model Object.

Hey folks, trying to use the Model class from the clearml SDK and seeing some weird errors. I am loading a model this way and trying to see a metadata value for the Model object.

from clearml import Model
input_model = Model.query_models(project_name="Test-Projects/My_Use_Case",
model_name="CV_Task_Best",
tags=["Pipeline", "ModelVal:Passed"],
only_published=True)
path_to_best_weights = input_model[0].get_local_copy()
input_model[0].get_metadata("version")

` AttributeError Traceback (most recent call last)
Cell In [8], line 1
----> 1 input_model[0].get_metadata("version")

File /usr/local/lib/python3.8/dist-packages/clearml/model.py:491, in BaseModel.get_metadata(self, key)
481 def get_metadata(self, key):
482 # type: (str) -> Optional[str]
483 """
484 Get one metadata entry value (as a string) based on its key. See Model.get_metadata_casted
485 if you wish to cast the value to its type (if possible)
(...)
489 :return: String representation of the value of the metadata entry or None if the entry was not found
490 """
--> 491 self._reload_if_required()
492 return self.get_all_metadata().get(str(key), {}).get("value")

File /usr/local/lib/python3.8/dist-packages/clearml/model.py:557, in BaseModel._reload_if_required(self)
556 def _reload_if_required(self):
--> 557 if not self._reload_required:
558 return
559 self._get_base_model().reload()

AttributeError: 'Model' object has no attribute '_reload_required' `

  
  
Posted one year ago
Votes Newest

Answers 6


Please add it to github! No other info is needed, we know what the issue is

  
  
Posted one year ago

Sure @<1523701435869433856:profile|SmugDolphin23> . Thanks for the quick response.

Let me know if you need more information from me. I can add that information in a git issue if you want to track it that way.

  
  
Posted one year ago

For other people's reference: None

  
  
Posted one year ago

I think you are correct, this is odd, let me check ...

  
  
Posted one year ago

Hi @<1523701132025663488:profile|SlimyElephant79> ! Looks like this is a bug on our part. We will fix this as soon as possible

  
  
Posted one year ago

What is weird is that (I think?) it worked Friday when I used it for another model object. Not sure what is happening here.

  
  
Posted one year ago
825 Views
6 Answers
one year ago
one year ago
Tags