DeepGraphLearning / SPN

29 stars 2 forks source link

The cora dataset cannot be loaded #2

Open J-zin opened 2 years ago

J-zin commented 2 years ago

Hi, I try to run the code with

python refine.py --dataset cora \
    --solve-proxy-epochs 200 \
    --solve-proxy-eval-every 20 \
    --solve-proxy-node-lr 1e-2 \
    --solve-proxy-edge-lr 2e-3 \
    --refine-node-lr 1e-3 \
    --refine-edge-lr 2e-4 \
    SAGE

but some errors are thrown Traceback (most recent call last): File "refine.py", line 126, in refine(args) File "refine.py", line 38, in refine train_loader, val_loader, test_loader = prepare_dataloaders(args) File "/apdcephfs/share_1364275/jzinou/github-repo/SPN/dataset.py", line 126, in prepare_dataloaders train_loader, val_loader, test_loader = map(precompute_edge_label_and_reverse, (train_loader, val_loader, test_loader)) File "/apdcephfs/share_1364275/jzinou/github-repo/SPN/dataset.py", line 17, in precompute_edge_label_and_reverse for data in dataset: File "/root/anaconda3/envs/shapley/lib/python3.7/site-packages/torch_geometric/data/dataset.py", line 197, in getitem data = self.get(self.indices()[idx]) File "/root/anaconda3/envs/shapley/lib/python3.7/site-packages/torch_geometric/data/in_memory_dataset.py", line 83, in get return copy.copy(self.data) File "/root/anaconda3/envs/shapley/lib/python3.7/copy.py", line 106, in copy return _reconstruct(x, None, rv) File "/root/anaconda3/envs/shapley/lib/python3.7/copy.py", line 275, in _reconstruct y = func(args) TypeError: call() missing 1 required positional argument: 'base_cls'

It seems that the provided cora dataset has some mistakes. Similar errors are found when I simply replace cora with citeseer, pubmed, but the dblp works well.

mnqu commented 2 years ago

Hi Zijing,

Thanks for the question. Our codes are not compatible with the latest torch-geometric package (2.0.X). You may consider using an older version (1.X.X) instead.

J-zin commented 2 years ago

Thanks for your super quick reply, torch-geometric==1.7.2 works well for me 🤗