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
Input_Model = C_Model.Query_Models(Project_Name="A/B", Model_Name="B", Tags=["Pipeline", "Modelval:Tocheck"]) # Path_To_Last_Weights = Input_Model[0].Download_Model_Weights() Path_To_

input_model = c_Model.query_models(project_name="A/B",
model_name="B",
tags=["Pipeline", "ModelVal:ToCheck"])

path_to_last_weights = input_model[0].download_model_weights()

path_to_last_weights = input_model[0].get_local_copy(force_download=True)
print(path_to_last_weights)

  
  
Posted one year ago
Votes Newest

Answers 4


I can't quite reproduce your issue. From the traceback it seems it has something to do with torch.load . I tried both your code snippet and creating a PyTorch model and then loading it, neither led to this error.

Could you provide a code snippet that is more like the code that is causing the issue? Also, can you please tell what clearml version are you using, and what is the Model URL in the UI? You can use the same filters in UI as the ones you used for Model.query_models to find the model

  
  
Posted one year ago

Traceback (most recent call last):
File "stage_4_inference.py", line 93, in <module>
inferObj = Yolov7Torch(config_file)
File "/root/.clearml/venvs-builds/3.8/task_repository/detection-sill_step_condition.git/sill_step_inference/torch_inference.py", line 53, in _ init _
self.model = attempt_load(self.weights, map_location=self.device)
File "/root/.clearml/venvs-builds/3.8/task_repository/detection-sill_step_condition.git/sill_step_inference/models/experimental.py", line 252, in attempt_load
ckpt = torch.load(w, map_location=map_location) # load
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/frameworks/_ init _.py", line 36, in inner_patch
raise ex
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/frameworks/
init _.py", line 34, in _inner_patch
ret = patched_fn(original_fn, *args, **kwargs)
File "/root/.clearml/venvs-builds/3.8/lib/python3.8/site-packages/clearml/binding/frameworks/pytorch_bind.py", line 232, in _load
model = original_fn(f, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 750, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 269, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 250, in _ init _
super(open_file, self). init _(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/root/.clearml/cache/storage_manager/global/0fcf399397ce3c83e484f268a71fb09d.last.pt'

  
  
Posted one year ago

Can you please attach the full traceback here?

  
  
Posted one year ago

I’ll investigate

  
  
Posted one year ago