vsomnath / graphretro

Learning Graph Models for Retrosynthesis Prediction (NeurIPS 2021)
https://arxiv.org/abs/2006.07038
MIT License
46 stars 14 forks source link

Some Questions about Graph Edit prediction #6

Closed zengkaipeng closed 1 year ago

zengkaipeng commented 1 year ago

According to the paper, the graph edit can be classified into two types,

In the paper, the edit prediction is solved by a classifier which outputs whether a bond change its type or whether a atom change it number of H. But how can we know which kind of change is done exactly (for example, how can we know that when a bond type changes, it's disconnected or it changes from a triple bond into a single bond)

AruShar commented 1 year ago

while running this command -- > python data_process/lg_edits/lg_tensors.py , this error is coming --> Traceback (most recent call last): File "data_process/lg_edits/lg_tensors.py", line 36, in lg_mols = joblib.load(lg_mols_file) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 658, in load obj = _unpickle(fobj, filename, mmap_mode) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle obj = unpickler.load() File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/pickle.py", line 1085, in load dispatchkey[0] File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 402, in load_build Unpickler.load_build(self) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/pickle.py", line 1557, in load_build for k, v in state.items(): AttributeError: 'tuple' object has no attribute 'items' How to solve it.

vsomnath commented 1 year ago

According to the paper, the graph edit can be classified into two types,

  • the number of H of atoms changes
  • the bond type changes

In the paper, the edit prediction is solved by a classifier which outputs whether a bond change its type or whether a atom change it number of H. But how can we know which kind of change is done exactly (for example, how can we know that when a bond type changes, it's disconnected or it changes from a triple bond into a single bond)

Possible changes for existing bonds and existing atoms for that molecule are kept track of (relevant code here and here) and the best one is picked.

vsomnath commented 1 year ago

while running this command -- > python data_process/lg_edits/lg_tensors.py , this error is coming --> Traceback (most recent call last): File "data_process/lg_edits/lg_tensors.py", line 36, in lg_mols = joblib.load(lg_mols_file) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 658, in load obj = _unpickle(fobj, filename, mmap_mode) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle obj = unpickler.load() File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/pickle.py", line 1085, in load dispatchkey[0] File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 402, in load_build Unpickler.load_build(self) File "/home/arushis/miniconda3/envs/seq_gr/lib/python3.7/pickle.py", line 1557, in load_build for k, v in state.items(): AttributeError: 'tuple' object has no attribute 'items' How to solve it.

This probably has something to do with the version of joblib. What is your current version of joblib, and maybe an older version (like 0.15.0 or 0.14.0) should potentially work.