facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

Improve error for esm-1v contact prediction regression weights. Remove warning, but raise when `return_contacts=True` #170

Open ftlbiped opened 2 years ago

ftlbiped commented 2 years ago

When running variant-prediction/predict.py, I am given a warning:

~/pkg/esm/esm/pretrained.py:150: UserWarning: Regression weights not found, predicting contacts will not produce correct results.

When I set a trace at that warning, I see that the code is expecting to find files containing regression waits for contact prediction with names like esm1v_t33_650M_UR90S_1-contact-regression.pt in the same location as the model files. No such file is downloaded automatically by predict.py, even when it automatically downloads the model files themselves. And I haven't been able to find these files hosted or even directly mentioned online either.

Is this an error with the program? Or do I need to get these files - and if so, how?

tomsercu commented 2 years ago

You don't need the regression weights, these are for contact prediction only. They are not uploaded on purpose to prevent folks from inadvertently using esm-1v for contact prediction which will lead to poor results, as discussed in the paper. Thanks for flagging, the error messaging here needs to be improved.