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

Need help with running semifrozen_finetuning.py #5

Closed
Lihua1990 opened this issue Mar 29, 2022 · 7 comments
Closed

Need help with running semifrozen_finetuning.py #5

Lihua1990 opened this issue Mar 29, 2022 · 7 comments

Comments

@Lihua1990
Copy link

Hi,

I want to try your models and when I run the semifrozen_finetuning.py script using the data provided by you. I got the following error messages.

Maybe you can help solve it? Thanks a lot in advance.
Screenshot 2022-03-29 162234

Have a nice day!

Best,
Lihua

@paulrbuckley
Copy link

paulrbuckley commented Apr 12, 2022

Hi,

I would like to report I am having the same issue, but by running the 'flexible_model_eval.py' script using provided data and suggested terminal arguments. I am wondering I am missing something?

Best,

Paul
Cursor_and_TITAN-main_—-bash—_188×45.pdf

@jannisborn
Copy link
Member

jannisborn commented Apr 12, 2022

HI @paulrbuckley and @Lihua1990
Thanks for your interest in our work and sorry for the late reply.

Did you verify that the path used at L140 (model_dir/protein_language.pkl) actually exists? If yes, my second guess is that it might be related to the python version you use 3.8 and 3.9 respectively and I think we developed the code on 3.7).

We will look more into this and come back soon

@paulrbuckley
Copy link

Thanks. Yes, i'm passing 'public/trained_model' as themodel path argument, and in that directory there is a file 'protein_language.pkl'

I'll try and see if I can get it working with python 3.7

@paulrbuckley
Copy link

To update, running in 3.7 appears to have resolved the issue. Still running the code but it hasn't immediately failed.

@Lihua1990
Copy link
Author

Thanks for the reply. I have checked that the .pkl file is there. I will check later if this is the problem with the python version.

@Lihua1990
Copy link
Author

after downgrading python to 3.7, new error occurred 'No file exists' for 'best_ROC-AUC_bimodal_mca.pt', checked the directory inside the trained_model/weights/ one .pt file exists and I just renamed it. Now it is running, no error so far...

Thank you!

@jannisborn
Copy link
Member

Hi,

I have slightly updated the workflow of the semifrozen_finetuning.py script to fix all your issues. Only minor changes were needed in the TITAN codebase itself

Original issue:

  • I released a new pytoda version which is the data handling package of TITAN. See release details for v1.0.1 here and v1.0.2 here. The reason why you observed the TypeError when trying to restore the language object with dill is because we originally used python 3.7 to dump those objects. This is a known issue in dill and unrelated to the native pytoda code. There is currently an open PR in dill on this: Allow 3.7 Pickles to be Loaded in 3.8 uqfoundation/dill#406

Followup issue:

  • I renamed the weights file from done_training_bimodal_bimca.pt to best_ROC-AUC_bimodal_mca.pt to avoid the last error @Lihua1990. Glad you fixed it yourself, but if you were to re-download the data from Box, it should work out of the Box (pun intended!) now

Housekeeping:

  • While doing this, I also fixed the argument name ordering/layout in the TITAN README
  • python version compatibility: I verified that the environment setup and the execution of the semifrozen_finetuning.py now runs smoothly with python 3.6, 3.7, 3.8 and 3.9

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