-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add model weights #106
Add model weights #106
Conversation
Codecov Report
@@ Coverage Diff @@
## master #106 +/- ##
==========================================
+ Coverage 97.51% 97.90% +0.38%
==========================================
Files 12 12
Lines 524 524
==========================================
+ Hits 511 513 +2
+ Misses 13 11 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I just realised that we need to decide on whether we want to just add the weights to the repo, or also ship them with the package. If we go for the latter, we would need to adapt the API a bit to make the new 256 and 64 weights loadable, probably by a keyword arg in |
@ElArkk, let's get back to this PR once you're done with your thesis work :). I'm going to leave it open |
I think we can ship the 256 and 64 weights with the package as well, those 10 MB more don't make much of a difference on package size anymore. Do you agree @ericmjl ? I made them loadable thorugh a kwarg in I wanted to migrate all weight files to git LFS in this PR (I'm following this guide here https://notiz.dev/blog/migrate-git-repo-to-git-lfs). But doing so overwrites branch history, and I need to force push the migration. Better to do this in a seperate PR in case stuff breaks I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small changes suggested, @ElArkk. Would you also like to add in tests to make sure that the weights are loaded correctly and that we can do a forward pass of protein sequences through them? I think once that is done we can call this a reliably written model.
Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com>
Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com>
… add-model-weights
Yes tests are on the todo! If we'd want to also allow for users to easily rep protein sequences using the paper's 256 and 64 model we'd need to rewrite the |
Merged! |
* add 256 and 64 weights * make format * make 256 and 64 paper weights loadable * add paper weight loading of different architectures to example * Update jax_unirep/utils.py Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com> * Update jax_unirep/utils.py Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com> * clear outputs * add tests for 256 and 64 paper weights Co-authored-by: Eric Ma <ericmjl@users.noreply.github.com>
Small PR to add the pickled version of the 256 and 64 original model weights. This adds another 10 MB to the package, @ericmjl I think that is ok given that the 1900 weights that we already ship are around 70 MB in size anyways?
This doesn't change anything about the fact that 1900 weights will be loaded by default, but one can now use
load_params
to get the original 256 and 64 weights (those models being stacked mLSTMs makes it a bit of a pain to load up the weights manually from the.npy
files)