Shen-Lab / GraphCL

[NeurIPS 2020] "Graph Contrastive Learning with Augmentations" by Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, Yang Shen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在unsupervised_TU中出现了bug

HeSasa opened this issue · comments

在unsupervised_TU中出现了bug,KeyError:'num_nodes'

Hi @HeSasa,

Probably you need to setup the environment consistent with that in https://github.com/Shen-Lab/GraphCL/tree/master/unsupervised_TU.

感谢回复!之前的问题已经解决了 ,是因为替换的数据集出了问题。但是又遇到了一个新的bug:
1
我print了一下edge_index,发现出现了负值:
image

@HeSasa

Feel it might still come from inconsistency... Would you mind sharing the environment and running script?

Name Version

binutils_impl_linux-64 2.36.1
binutils_linux-64 2.36
ca-certificates 2021.10.8
certifi 2021.10.8
cycler 0.10.0
decorator 4.4.2
gcc_impl_linux-64 11.2.0
gcc_linux-64 11.2.0
joblib 1.1.0
kernel-headers_linux-64 2.6.32
kiwisolver 1.3.1
ld_impl_linux-64 2.36.1
libgcc-devel_linux-64 11.2.0
libgcc-ng 11.2.0
libgomp 11.2.0
libsanitizer 11.2.0
libstdcxx-ng 11.2.0
libzlib 1.2.11
markupsafe 2.0.1
matplotlib 3.3.4
numpy 1.19.5
openssl 1.0.2u
pip 21.3
pyparsing 2.4.7
python 3.6.2
python-dateutil 2.8.2
python_abi 3.6
pytz 2021.3
pyyaml 5.4.1
rdflib 5.0.0
readline 6.2
requests 2.26.0
scikit-learn 0.24.2
scipy 1.5.4
seaborn 0.11.2
setuptools 49.6.0
six 1.16.0
sqlite 3.13.0
sysroot_linux-64 2.12
threadpoolctl 3.0.0
tk 8.5.18
torch 1.6.0
torch-geometric 2.0.1
torch-scatter 2.0.6
torch-sparse 0.6.9
torchvision 0.7.0
tqdm 4.62.3
urllib3 1.26.7
wheel 0.37.0
xz 5.2.5
yacs 0.1.8
zlib 1.2.11

This is may environment, and I run "./go.sh 2 TEXT random2".

@HeSasa

That's awesome you use the latest torch-geometric==2... Our program was developed earlier so probably torch-geometric==1.6.0 is better as stated in readme (https://github.com/Shen-Lab/GraphCL/tree/master/unsupervised_TU).

I will try again, thank you for your answer.

I change my environment to torch-geometric==1.6.0、pytorch==1.6.0,but still have same error.

@HeSasa

Can you run the script in https://github.com/fanyun-sun/InfoGraph/tree/master/unsupervised? Our code base is built on it so wondering whether you can successfully run this.

image

Hi! I got the same problem. How did you solve it?

Replace line188 and 209 "for key in self.data.keys:" with "for key in self.slices.keys():" in aug.py. For me, this problem can avoided. @ZsZsZs25

Thanks a lot! I'll try it!

@Niuchx Sorry for the late reply, and thank you very much!