-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Hi,when I use torchdrug to load the pretrained ESM, an error occured ,just like I show below.could you please help me to fix it?Thanks!
the code I used in my file was:
from torchdrug import models
model = models.EvolutionaryScaleModeling('./')
21:17:32 Downloading https://dl.fbaipublicfiles.com/fair-esm/models/esm1b_t33_650M_UR50S.pt to ./esm1b_t33_650M_UR50S.pt
21:39:01 Downloading https://dl.fbaipublicfiles.com/fair-esm/regression/esm1b_t33_650M_UR50S-contact-regression.pt to ./esm1b_t33_650M_UR50S-contact-regression.pt
and the error occured just like this.
Traceback (most recent call last):
File "", line 1, in
File "/root/anaconda3/envs/torchdrug/lib/python3.7/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/root/anaconda3/envs/torchdrug/lib/python3.7/site-packages/torchdrug-0.2.0-py3.7.egg/torchdrug/core/core.py", line 288, in wrapper
return init(self, *args, **kwargs)
File "/root/anaconda3/envs/torchdrug/lib/python3.7/site-packages/torchdrug-0.2.0-py3.7.egg/torchdrug/models/esm.py", line 55, in init
_model, alphabet = self.load_weight(path, model)
File "/root/anaconda3/envs/torchdrug/lib/python3.7/site-packages/torchdrug-0.2.0-py3.7.egg/torchdrug/models/esm.py", line 80, in load_weight
return esm.pretrained.load_model_and_alphabet_core(model_data, regression_data)
File "/root/anaconda3/envs/torchdrug/lib/python3.7/site-packages/esm/pretrained.py", line 190, in load_model_and_alphabet_core
if model_name.startswith("esm2"):
AttributeError: 'dict' object has no attribute 'startswith'