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
Is There A Direct Way To Get A Model Using Its Id Like It Works With Dataset.Get?

Is there a direct way to get a model using its id like it works with Dataset.get?

  
  
Posted 2 years ago
Votes Newest

Answers 8


When I try to get local copy, I get this error.

File "load_model.py", line 8, in <module>
location = input_model.get_local_copy()
File "/home/fawad-nizamani/anaconda3/envs/ocr-sip-clearml/lib/python3.8/site-packages/clearml/model.py", line 424, in get_local_copy
return self.get_weights_package(return_path=True, raise_on_error=raise_on_error)
File "/home/fawad-nizamani/anaconda3/envs/ocr-sip-clearml/lib/python3.8/site-packages/clearml/model.py", line 318, in get_weights_package
obj = func(packed_file)
File "/home/fawad-nizamani/anaconda3/envs/ocr-sip-clearml/lib/python3.8/zipfile.py", line 1269, in init
self._RealGetContents()
File "/home/fawad-nizamani/anaconda3/envs/ocr-sip-clearml/lib/python3.8/zipfile.py", line 1332, in _RealGetContents
endrec = _EndRecData(fp)
File "/home/fawad-nizamani/anaconda3/envs/ocr-sip-clearml/lib/python3.8/zipfile.py", line 264, in _EndRecData
fpin.seek(0, 2)
AttributeError: 'NoneType' object has no attribute 'seek'

  
  
Posted 2 years ago

Normally when you save a model in tensorflow, you get a whole saved_model not just the weights. Is there no way to get the whole model including the architecture?

  
  
Posted 2 years ago

Basically when I'm loading the model in InputModel, it loads it fine but I can't seem to get a local copy.

  
  
Posted 2 years ago

Should be:
` from clearml import InputModel

model = InputModel(<id>) `

  
  
Posted 2 years ago

What is the Model url?
print(model.url)

  
  
Posted 2 years ago

bump

  
  
Posted 2 years ago

I did this but this gets me an InputModel. I went through the InputModel class but I'm still unsure how to get the actual tensorflow model.

  
  
Posted 2 years ago

Assuming Tensorflow (which would be an entire folder)
local_folder_or_files = mode.get_weights_package()

  
  
Posted 2 years ago