awslabs / dgl-lifesci

Python package for graph neural networks in chemistry and biology
Apache License 2.0
696 stars 144 forks source link

mask error for MoleculeCSVDataset #184

Closed nbrosse closed 1 year ago

nbrosse commented 2 years ago

MoleculeCSVDataset fails if load=True because the mask attribute is not set to None,

In https://github.com/awslabs/dgl-lifesci/blob/f854adf6f41ec5825f76783fb64c2b59ab520ef5/python/dgllife/data/csv_dataset.py#L131, we should add else self.mask = None

  File "/usr/local/lib/python3.8/dist-packages/dgllife/data/csv_dataset.py", line 199, in __getitem__
    if self.mask is not None:
AttributeError: 'MoleculeCSVDataset' object has no attribute 'mask'
mufeili commented 2 years ago

Thanks for reporting the issue. Could you help open a PR to fix this?

nbrosse commented 1 year ago

Yep, sorry for the late reply, Unfortunately I am not able to python setup.py install the project I have the following error:

Cython.Compiler.Errors.CompileError: pandas/_libs/groupby.pyx
❯ pip show cython
Name: Cython
Version: 0.29.31
Summary: The Cython compiler for writing C extensions for the Python language.
Home-page: http://cython.org/
Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
Author-email: cython-devel@python.org
License: Apache
Location: /Users/nbrosse/.pyenv/versions/miniconda3-4.3.30/envs/dgllife/lib/python3.7/site-packages
Requires:
Required-by:
mufeili commented 1 year ago

No worries. I guess you need to fix your cython and/or related dependencies. Could you take a look at PR #189 and see if you are good with it?

nbrosse commented 1 year ago

Ok for me thanks ! :)