Maybe a simple issue, but I'm trying to reproduce the simple structure prediction using the v1 model from the readme example (see bottom for that unedited code). However, I get SSL: CERTIFICATE_VERIFY_FAILED error at this line model = esm.pretrained.esmfold_v1(). Seems like it's trying to download the pretrained model on the fly and my setup doesn't like that. So instead I just downloaded v1 locally like this:
cd checkpoints/
curl -s https://dl.fbaipublicfiles.com/fair-esm/models/esmfold_3B_v1.pt -o esmfold_3B_v1.pt
And now I'm just trying to point it to the locally installed v1 model. However when I do this it complains:
input:
model = esm.pretrained.load_model_and_alphabet_local('/path/to/esm/checkpoints/esmfold_3B_v1.pt')
model = model.eval()
Not sure what the issue is. Is it still looking for a contact-regression.pt file? My understanding is the v1 model doesn't come with this. There must be a way to point it to the locally installed v1 pretrained model that I'm just missing?
Here is the full code from the README for reference:
import torch
import esm
model = esm.pretrained.esmfold_v1()
model = model.eval().cuda()
# Optionally, uncomment to set a chunk size for axial attention. This can help reduce memory.
# Lower sizes will have lower memory requirements at the cost of increased speed.
# model.set_chunk_size(128)
sequence = "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG"
# Multimer prediction can be done with chains separated by ':'
with torch.no_grad():
output = model.infer_pdb(sequence)
with open("result.pdb", "w") as f:
f.write(output)
import biotite.structure.io as bsio
struct = bsio.load_structure("result.pdb", extra_fields=["b_factor"])
print(struct.b_factor.mean()) # this will be the pLDDT
# 88.3
Maybe a simple issue, but I'm trying to reproduce the simple structure prediction using the v1 model from the readme example (see bottom for that unedited code). However, I get SSL: CERTIFICATE_VERIFY_FAILED error at this line
model = esm.pretrained.esmfold_v1()
. Seems like it's trying to download the pretrained model on the fly and my setup doesn't like that. So instead I just downloaded v1 locally like this:And now I'm just trying to point it to the locally installed v1 model. However when I do this it complains:
input:
error:
Not sure what the issue is. Is it still looking for a contact-regression.pt file? My understanding is the v1 model doesn't come with this. There must be a way to point it to the locally installed v1 pretrained model that I'm just missing?
Here is the full code from the README for reference: