Rose-STL-Lab / LIMO

generative model for drug discovery
59 stars 14 forks source link

_pickle.UnpicklingError: invalid load key, 'v'. #3

Closed nghiencuuthuoc closed 11 months ago

nghiencuuthuoc commented 2 years ago

python generate_molecules.py Traceback (most recent call last): File "/home/pharmapp/DD-2022/LIMO/generate_molecules.py", line 15, in vae.load_state_dict(torch.load('vae.pt')) File "/home/pharmapp/anaconda3/envs/env0/lib/python3.10/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/home/pharmapp/anaconda3/envs/env0/lib/python3.10/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.

PeterEckmann1 commented 2 years ago

Hi, it looks like the pretrained vae.pt file wasn't downloaded fully. It's a GIT LFS file, so maybe you need to install https://git-lfs.github.com/ if it's not already installed, and then try cloning the repo again? If that doesn't help, I can also put the file on google drive for you to download manually.

MarieOestreich commented 2 years ago

Hi, I am having the same issue and I did install git-lfs and re-cloned the repo but that didn't solve it.

Thanks for the help!

PeterEckmann1 commented 2 years ago

Thanks for giving it a try! It's possible doing an additional git lfs pull is needed after the repo is cloned (I think it's the same issue as https://github.com/YBIGTA/pytorch-hair-segmentation/issues/38#issuecomment-844573338. Alternatively, I put vae.pt on google drive here if it's easier to just download it directly: https://drive.google.com/file/d/1UE8A-eUBQsT9Ke45S56VtqVIZgGWD_6u/view?usp=sharing