Error using torch.load() (.pt file is corrupted)

Hi everyone,

I’m running a YoloV5 model on Azure ML using a compute cluster. In the train file I changed opt.save_dir from str(increment_path(Path(opt.project) /, exist_ok=opt.exist_ok)) to 'logs/', since that is required when running on AzureML (to save the weights somewhere). The folder is indeed created, but when downloading and running !python --img 512 --data data/images --weights the following error will occur: RuntimeError: PytorchStreamReader failed reading file data/0: invalid header or archive is corrupted. The same error will occur when using torch.load(

EDIT: The validation part (using when the training process is finished does work, but after downloading the “” file locally and loading it, it gives errors.

Anyone who might know what the cause of the error is?

Thanks in advance,
Kind regards,