cvignac / DiGress

code for the paper "DiGress: Discrete Denoising diffusion for graph generation"
MIT License
349 stars 73 forks source link

Import problem in training stage #73

Open lajictw opened 10 months ago

lajictw commented 10 months ago

Hi! I met an import problem in training stage. When running the main.py, it reports

Error executing job with overrides: [] Traceback (most recent call last): File "/mnt/c/Users/14242/Desktop/PaperCode/DiGress/./src/main.py", line 104, in main from metrics.molecular_metrics import TrainMolecularMetrics, SamplingMolecularMetrics File "/mnt/c/Users/14242/Desktop/PaperCode/DiGress/src/metrics/molecular_metrics.py", line 1, in from rdkit import Chem File "/home/ctw/anaconda3/envs/GNN/lib/python3.9/site-packages/rdkit/Chem/init.py", line 16, in from rdkit.Chem import rdchem TypeError: No registered converter was able to produce a C++ rvalue of type std::string from this Python object of type str

But if I run the

from metrics.molecular_metrics import TrainMolecularMetrics, SamplingMolecularMetrics

alone, I don't have this problem. Screenshots of the run have been attached below. Thanks for your help! image Rdkit is also available. image

cvignac commented 10 months ago

Hello, did you run pip install -e . in the root folder?

You can try to import rdkit at the first line of main.py, sometimes it works. Apart from that, I am not able to help you unfortunately.

HeartrooT commented 10 months ago

I had met and solved it, move the error import sentence to the first line of the main.py

lajictw commented 10 months ago

I had met and solved it, move the error import sentence to the first line of the main.py

Thanks! I will check it out!