rxn4chemistry / rxnfp

Reaction fingerprints, atlases and classification. Code complementing our Nature Machine Intelligence publication on "Mapping the space of chemical reactions using attention-based neural networks" (http://rdcu.be/cenmd).
https://rxn4chemistry.github.io/rxnfp/
MIT License
156 stars 40 forks source link

Error When Generating Fingerprints #9

Closed DayRB25 closed 3 years ago

DayRB25 commented 3 years ago

Hello,

I have attached an image detailing the error I am getting when running the ft_10k cell of the "03_generate_fingerprints" ipynb file.

Any solutions?

GitHubExample
pschwllr commented 3 years ago

Could you provide me with more information about your conda environment? What python / pytorch / transformers / rxnfp versions have you installed?

pschwllr commented 3 years ago

I have installed rxnfp using:

conda create -n rxnfp python=3.6 -y
conda activate rxnfp
conda install -c rdkit rdkit=2020.03.3 -y
conda install -c tmap tmap -y
pip install rxnfp

and running the notebook works for me.

Could you try this way of installing the code?

DayRB25 commented 3 years ago

Hello, thank you for the suggestions. When attempting to install rxnfp via the commands you suggested, I am getting a message of: "PackagesNotFoundError: The following packages are not available from current channels" for both the rdkit=2020.03.3 and the tmap.

Is it possible that I have done something incorrectly?

Thanks

DayRB25 commented 3 years ago

To add: Pytorch Version: 1.7.1 Transformers Version: 4.6.1

pschwllr commented 3 years ago

The requirements for rxnfp are currently transformers>=2.5.1,<4.

But this does not explain why you cannot install rdkit through conda. You could try to follow the official installation guidelines: https://www.rdkit.org/docs/Install.html

What python version are you using in your environment?

DayRB25 commented 3 years ago

Python version: 3.7.6

In the case of tmap, I have not attempted to download this before. However, I have installed rdkit a couple months ago with no issues, so the error is odd.

DayRB25 commented 3 years ago

It appears as if changing to a supported version of transformers has gotten rid of the error I originally posted. I am using rdkit version: 2020.03.2 as of now and it seems to be working fine. I will provide any updates if need be

DayRB25 commented 3 years ago

Okay, can confirm the error is no longer an issue with the new transformers version. Thank you for the help!