loading Roboflow workspace...
loading Roboflow project...
Traceback (most recent call last):
File ".\robo.py", line 5, in <module>
project.version(4).deploy(model_type='yolov5', model_path='C:/work/codes/yolov5/runs/train/exp19')
File "C:\Users\changyuyang\AppData\Local\Programs\Python\Python38\lib\site-packages\roboflow\core\version.py", line 499, in deploy
model = torch.load(os.path.join(model_path, "weights/best.pt"))
File "C:\Users\changyuyang\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1014, in load
return _load(opened_zipfile,
File "C:\Users\changyuyang\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1422, in _load
result = unpickler.load()
File "C:\Users\changyuyang\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\serialization.py", line 1415, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'models'
Sorry about the trouble you’re having. Is this running on your own local code, as opposed to one of our notebooks, for example?
One thing you can try is that you need to have the correct version of the YOLOv5 package installed to do the model upload process correctly. From our YOLOv5 notebook, try running this before your upload: