graphdeeplearning / graphtransformer

Graph Transformer Architecture. Source code for "A Generalization of Transformer Networks to Graphs", DLG-AAAI'21.

Home Page:https://arxiv.org/abs/2012.09699

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: Can't get attribute 'DGLHeteroGraph' on <module 'dgl.heterograph' >

RodyCoco opened this issue · comments

Hi, I try to run the example code "main_SBMs_node_classification.py" by the following command:

python main_SBMs_node_classification.py --gpu_id 0 --config 'configs/SBMs_GraphTransformer_CLUSTER_500k_full_graph_BN.json'

But it comes with the following error:
AttributeError: Can't get attribute 'DGLHeteroGraph' on <module 'dgl.heterograph' from '/home/rody/.local/share/virtualenvs/rody-V7qEFACp/lib/python3.6/site-packages/dgl/heterograph.py'>

How can I fix this bug, thanks!

I fix it by remove dgl and install dgl(cuda version) because I run with gpu.

I remove dgl and installed dgl 1.1.2+cu118 dglgo 0.0.2(cuda version==12.2), but it still comes with the following errors: cuda available with GPU: NVIDIA GeForce RTX 3090
[I] Loading dataset SBM_CLUSTER...
Traceback (most recent call last):
File "/home/zbh/whd/benchmarking-gnns-master/main_SBMs_node_classification.py", line 428, in
main()
File "/home/zbh/whd/benchmarking-gnns-master/main_SBMs_node_classification.py", line 318, in main
dataset = LoadData(DATASET_NAME)
File "/home/zbh/whd/benchmarking-gnns-master/data/data.py", line 38, in LoadData
return SBMsDataset(DATASET_NAME)
File "/home/zbh/whd/benchmarking-gnns-master/data/SBMs.py", line 160, in init
f = pickle.load(f)
AttributeError: Can't get attribute 'DGLHeteroGraph' on <module 'dgl.heterograph' from '/home/zbh/.conda/envs/dgl/lib/python3.9/site-packages/dgl/heterograph.py'>. How can I fix this bug, thx!

Maybe the .pkl file version is not compatible with the newest version of dgl??