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'
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
Can you please attach the full traceback here?