protein_bert icon indicating copy to clipboard operation
protein_bert copied to clipboard

Failing to get the weights from the dedicated github repo

Open Basso42 opened this issue 1 year ago • 5 comments

Hello,

When trying to run the demo in the readme.md of the repo, the function pretrained_model_generator, input_encoder = load_pretrained_model() offers to download the .pkl file containing the weights of the model. However, after typing in 'Yes', I obtain a 404 error: not found.

Trying to manually retrieve the weights from github with lfs I get this error batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access. Failed to fetch some objects from 'https://github.com/nadavbra/proteinbert_data_files.git/info/lfs'

Is there anything that can be done? How could I use the weights from the huggingface repo that have a .pb extension to reproduce the first lines of code of the demo?

Thanks for your help !

Basso42 avatar Dec 28 '23 14:12 Basso42

@Basso42 I purchased more LFS quota. Does it work now?

nadavbra avatar Dec 29 '23 16:12 nadavbra

Hi, I'm trying to run the finetuning on colab, but ran into the error for the optimizer. Can't seem to install the tensorflow version 2.4.0 with pip install, so the version by default will be 2.15.0. Not sure if this version is affecting the access to the weights. Are there alternatives?

/usr/local/lib/python3.10/dist-packages/proteinbert/model_generation.py in update_state(self, model)
     33     def update_state(self, model):
     34         self.model_weights = copy_weights(model.get_weights())
---> 35         self.optimizer_weights = copy_weights(model.optimizer.get_weights())
     36 
     37     def _init_weights(self, model):

AttributeError: 'Adam' object has no attribute 'get_weights'

dp9090 avatar Jan 03 '24 10:01 dp9090

@Basso42 I purchased more LFS quota. Does it work now?

I am in holiday period right now but as soon as I get back on the project I will let you know. I just downloaded the weights directly from Xenodo which I think you may implement directly in the function. I was also trying to solve some environments issues, a environment.yml file to set up the appropriate conda environment could be useful for next users. See for example the one in the ProtTrans repo. Thanks again for your great research work!

Basso42 avatar Jan 04 '24 13:01 Basso42

@Basso42 Once you resolve the dependencies, if you're willing to upload the dependencies file to GitHub, that would be appreciated (you can make a pull request).

nadavbra avatar Jan 07 '24 12:01 nadavbra

@dp9090 Your question doesn't seem related to this issue. I also think it's been asked and answered in the past. Please run a quick search over our past Issues. If you don't find an answer, feel free to resubmit your question as a new Issue.

nadavbra avatar Jan 07 '24 12:01 nadavbra