AutoGL
AutoGL copied to clipboard
[BUG] AttributeError: 'DGLHeteroGraph' object has no attribute 'size'
Describe the bug When running /autogl/test/nas/node_classification.py with AUTOGL_BACKEND=dgl, I got the following error.
Traceback (most recent call last):
File "node_classification.py", line 116, in <module>
model = algo.search(space, dataset, esti)
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/autogl-0.3.0rc0-py3.7.egg/autogl/module/nas/algorithm/random_search.py", line 69, in search
metric, loss, hardware_metric = self._infer(mask="val")
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/autogl-0.3.0rc0-py3.7.egg/autogl/module/nas/algorithm/random_search.py", line 86, in _infer
metric, loss = self.estimator.infer(self.arch._model, self.dataset, mask=mask)
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/autogl-0.3.0rc0-py3.7.egg/autogl/module/nas/estimator/one_shot.py", line 35, in infer
pred = model(dset)[mask]
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/autogl-0.3.0rc0-py3.7.egg/autogl/module/nas/space/autoattend.py", line 202, in forward
stem_out = bk_gconv(op, data, drop(input))
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/autogl-0.3.0rc0-py3.7.egg/autogl/module/nas/backend.py", line 16, in bk_gconv
return op(data,feat)
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/villa/zhangyp/anaconda3/envs/graproj/lib/python3.7/site-packages/torch_geometric/nn/conv/arma_conv.py", line 110, in forward
edge_index, edge_weight, x.size(self.node_dim),
AttributeError: 'DGLHeteroGraph' object has no attribute 'size'
It happens in 'random + autoattend' stage、 'rl + autoattend' stage and 'darts + graphnas' stage.
To Reproduce Steps to reproduce the behavior:
- Go to '/AutoGL/autogl/test/nas/'
- export AUTOGL_BACKEND=dgl
- python node_classification.py
- See error
Environment (please complete the following information):
- OS: Ubuntu 20.04
- python version: 3.7.11
- autogl version: 0.3.0-pre
- pip list:
alabaster 0.7.12
astor 0.8.1
attrs 21.4.0
autogl 0.3.0rc0
autopep8 1.6.0
Babel 2.9.1
bayesian-optimization 1.2.0
brotlipy 0.7.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.4
chocolate 0.0.2
click 8.1.2
cloudpickle 2.0.0
colorama 0.4.4
contextlib2 21.6.0
cryptography 36.0.0
cycler 0.11.0
dgl-cu113 0.8.0.post2
dglgo 0.0.1
dill 0.3.4
docutils 0.17.1
filelock 3.6.0
fonttools 4.30.0
future 0.18.2
hyperopt 0.1.2
idna 3.3
imagesize 1.3.0
importlib-metadata 4.11.3
isort 5.10.1
Jinja2 3.0.3
joblib 1.1.0
json-tricks 3.15.5
jsonlines 3.0.0
kiwisolver 1.3.2
lightgbm 3.3.2
littleutils 0.2.2
MarkupSafe 2.1.0
matplotlib 3.5.1
mkl-fft 1.3.1
mkl-random 1.2.2
mkl-service 2.4.0
NetLSD 1.0.2
networkx 2.6.3
nni 2.6.1
numpy 1.21.2
numpydoc 1.2.1
ogb 1.3.3
outdated 0.2.1
packaging 21.3
pandas 1.3.5
Pillow 9.0.1
pip 21.2.2
prettytable 3.2.0
psutil 5.9.0
pycodestyle 2.8.0
pycparser 2.21
pydantic 1.9.0
Pygments 2.11.2
pymongo 4.0.2
pyOpenSSL 22.0.0
pyparsing 3.0.7
PySocks 1.7.1
python-dateutil 2.8.2
PythonWebHDFS 0.2.3
pytz 2021.3
PyYAML 6.0
requests 2.27.1
responses 0.19.0
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
schema 0.7.5
scikit-learn 1.0.2
scipy 1.7.3
setuptools 58.0.4
simplejson 3.17.6
six 1.16.0
snowballstemmer 2.2.0
Sphinx 4.5.0
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
tabulate 0.8.9
threadpoolctl 3.1.0
toml 0.10.2
torch 1.11.0
torch-geometric 2.0.4
torch-scatter 2.0.9
torch-sparse 0.6.13
torchaudio 0.11.0
torchvision 0.12.0
tqdm 4.63.0
typeguard 2.13.3
typer 0.4.1
typing-extensions 3.10.0.2
urllib3 1.26.8
wcwidth 0.2.5
websockets 10.2
wheel 0.37.1
zipp 3.7.0
Additional Info As I can run this file with AUTOGL_BACKEND=pyg correctly, it may be caused by the mixed use of pyg method and dgl dataset.