Shen-Lab / GraphCL_Automated

[ICML 2021] "Graph Contrastive Learning Automated" by Yuning You, Tianlong Chen, Yang Shen, Zhangyang Wang; [WSDM 2022] "Bringing Your Own View: Graph Contrastive Learning without Prefabricated Data Augmentations" by Yuning You, Tianlong Chen, Zhangyang Wang, Yang Shen
109 stars 11 forks source link

Bugs on TUDatasets with no features #4

Closed zekarias-tilahun closed 2 years ago

zekarias-tilahun commented 2 years ago

Hi,

Thank you very much for an excellent work. I have been trying your work on TUDatasets and it works well with the chemical datasets, however, for those dataset with no features (e.g., IMDB-BINARY, IMDB-MULTI, REDDIT-BINARY, COLLAB) I encountered a bug. I've tried to resolve it for some time now and failed to do so. I very much appreciate it if you could let me know (1) if you have tried your code on the aforementioned datasets and worked for you (2) if not, would you mind looking at the trace and give me your feedback.

Traceback (most recent call last):
  File "~/GraphCL_Automated/unsupervised_TU/joaov2.py", line 158, in <module>
    print(dataset.get_num_feature())
  File "~/GraphCL_Automated/unsupervised_TU/aug.py", line 189, in get_num_feature
    item, slices = self.data[key], self.slices[key]
KeyError: 'num_nodes'

Thank you in advance for your help!

yyou1996 commented 2 years ago

Hi @zekarias-tilahun,

Please refer to https://github.com/Shen-Lab/GraphCL/issues/36#issuecomment-994840071.

zekarias-tilahun commented 2 years ago

That you for the quick reply @yyou1996, that has fixed the problem.