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

Same prediction for every molecules with pretrained and finetuned model. #21

Closed
Changgun-Choi opened this issue Jan 31, 2022 · 8 comments

Comments

@Changgun-Choi
Copy link

Hello,
By using quick_tour.py, results are always same for different molecules. I am confused about it.
The result is also same for the fine-tuned model.

image

@Changgun-Choi
Copy link
Author

Hello,
I tried with it several times but I can't understand why the prediction is the same for all molecules.
I would really appreciate it if you help me.

Best regards,

@panpiort8
Copy link
Collaborator

Hello :) could you provide the rest of your code, please? Could you also explain how you run your code? Line by line from command-line, or with Jupyter notebook? Unfortunately, I am unable to deduce it from your screen :)

@Changgun-Choi
Copy link
Author

Changgun-Choi commented Feb 3, 2022

image

Hello! thank you very much for the reply.

  1. I run the whole quick.tour.py without changing anything. So it downloads the dataset and train and predicts 2 different molecules with the same result.

I expected featurizer creates different results but always same as you can see here. So I assume that problems come from 'featurizer = MatFeaturizer.from_pretrained('mat_masking_20M')'

image
image

  1. I used my own dataset from the company and followed quick_tour.py file, giving same predictions as well.

@panpiort8
Copy link
Collaborator

Hmm, it's quite strange. Could you show me your conda environment, please? Moreover, could you try to reproduce this bug from a freshly cloned huggingmolecules repository? Cause I see you've modified the src/ directory - maybe the modification introduced some bug? Probably not, but I cannot see many other options.

Btw: quick_tour.py imports MatFeaturizer from the version of huggingmolecules that is currently installed in your python environment (from huggingmolecules import MatModel, MatFeaturizer). If you modify the code, you should also update the installed huggingmolecules package by running pip install -e src/.

@Changgun-Choi
Copy link
Author

Thank you for the reply!

I cloned the new git repository but I don't see any difference. So, this bug doesn't appear to you and gives different predictions?

In terms of 'pip install -e src/.', it gives an error below so I downloaded pytorch myself.

image
image

image

@panpiort8
Copy link
Collaborator

Yep, unfortunately, I cannot reproduce the bug :< I've tried on three different machines, but everything works. But looking at the above screenshots, I'm not sure if you tried to reinstall huggingmolecules once again, after installing pytorch 1.7.0. Could you please run pip install -e src/ again? Maybe I am wrong, but the only possibility, I see at the moment is that you have still some bugged version of huggingmolecules installed in your conda environment.

Btw: in branch change_setup_requirements, I've updated torch requirements to match the versions available with pip. If you use this branch to run pip install -e src/, it should reinstall the package successfully.

@Changgun-Choi
Copy link
Author

Hello, I created a new conda environment and started from the beginning.
I ran 'pip install -e src/' and 'requirements.txt' but I get these dependencies issues. I think those should be downloaded before running the script.
Did you also try creating a new conda environment when you couldn't reproduce the bug?
Thank you!

image

@panpiort8
Copy link
Collaborator

I have installed huggingmolecules and the additional requirements in the new conda environment, and everything works fine.
I am not sure why you have tensorflow-gpu installed as it is not listed in any huggingmolecules dependency.
I'm afraid I cannot reproduce your bug because I use a different operating system (Ubuntu). Do you use Windows?
Unfortunately, huggingmolecules was only tested on Ubuntu and macOS, so it may not work on Windows for the reason that I cannot figure out.

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

2 participants