AstraZeneca / chemicalx

A PyTorch and TorchDrug based deep learning library for drug pair scoring. (KDD 2022)
https://chemicalx.readthedocs.io
Apache License 2.0
708 stars 87 forks source link

fix compatibility with torch drug #106

Closed avi-pomicell closed 1 year ago

avi-pomicell commented 1 year ago

this fixes AttributeError: type object 'Molecule' has no attribute 'dummy_atom'

Changes

fix contants.py

kajocina commented 1 year ago

hi! when do you get this error exactly? can you explain the problem a bit more?

codecov-commenter commented 1 year ago

Codecov Report

Merging #106 (2894a58) into main (4ad18c1) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #106   +/-   ##
=======================================
  Coverage   94.65%   94.65%           
=======================================
  Files          34       34           
  Lines        1478     1478           
=======================================
  Hits         1399     1399           
  Misses         79       79           
Impacted Files Coverage Δ
chemicalx/constants.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

avi-pomicell commented 1 year ago

hi! when do you get this error exactly? can you explain the problem a bit more?

this is what i remember: I installed the requirements and tried running the example code.

I got an error AttributeError: type object 'Molecule' has no attribute 'dummy_atom'

I did some research and found out that this is because of a recent change in one of the dependency packages (torchdrug?). when i downgraded the dependency, the code worked ok.

I found out that the field "dummy_atom" was removed recently.

this pull requests solves that issue.

kajocina commented 1 year ago

Thanks :)