Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What model is needed for regression_data in esm.pretrained.load_model_and_alphabet_local? #103

Closed
xmhh opened this issue Jul 13, 2021 · 8 comments

Comments

@xmhh
Copy link

xmhh commented Jul 13, 2021

Bug description
Use esm.pretrained.load_model_and_alphabet_local(
'esm1_t12_85M_UR50S.pt'), i need to load esm1_t12_85M_UR50S-contact-regression.pt, but in fact this is not provided.

Logs
image

Output goes here

Additional context
If you want to load the local esm model, besides the esm1_t12_85M_UR50S.pt you provided, do you need any regression model? What is the meaning of regression_data in your code esm.pretrained.load_model_and_alphabet_local
.

@xmhh
Copy link
Author

xmhh commented Jul 13, 2021

The 0.3.1 version uses the try except statement, so there is no regression-related model in the load and no error will be reported, but I still want to know what this regression does?

@tomsercu
Copy link
Contributor

Yes you need a second file to load the regression weights, aka weights of the ContactPredictionHead.
Failure was silent before, but better to be explicit.
If you load via esm.pretrained.esm1_t12_85M_UR50S(), the regression weights will be downloaded to ~/.cache/torch/hub/checkpoints.
Let me know if that helps?

@xmhh
Copy link
Author

xmhh commented Jul 14, 2021

Yes you need a second file to load the regression weights, aka weights of the ContactPredictionHead.
Failure was silent before, but better to be explicit.
If you load via esm.pretrained.esm1_t12_85M_UR50S(), the regression weights will be downloaded to ~/.cache/torch/hub/checkpoints.
Let me know if that helps?
Yes, what you said is a useful solution. If I don’t want to download this model from https://dl.fbaipublicfiles.com/fair-esm/regression, can you provide it directly like other training models? just like download link below.
image

Of course, we can also know his address from your source code, but it may be slightly inconvenient.
Thanks for you reply. : )

@tomsercu
Copy link
Contributor

Ah yes - we should update that table with link to both model weights and regression.
For now: This is the code which points to
https://dl.fbaipublicfiles.com/fair-esm/regression/{model_name}-contact-regression.pt

@tomsercu
Copy link
Contributor

@xmhh is your problem solved?

@Mountain-White
Copy link

Sry for bothering,but I can‘t run your esm-1v code for losing contact-regression.pt. I try to download from pretrained:load_regression_hub(), but failed again.However, I can download esm-1b.Did you forget to upload or ...?

@tomsercu
Copy link
Contributor

tomsercu commented Aug 2, 2021

@Mountain-White esm-1v does not have contact-regression.pt because it is not optimal for that task (rather it is best for variant prediction). Does that answer your question?

@Mountain-White
Copy link

@Mountain-White esm-1v does not have contact-regression.pt because it is not optimal for that task (rather it is best for variant prediction). Does that answer your question?

thx ,the problem is solved.

@tomsercu tomsercu closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants