zekarias-tilahun / SelfGNN

A PyTorch implementation of "SelfGNN: Self-supervised Graph Neural Networks without explicit negative sampling" paper, which appeared in The International Workshop on Self-Supervised Learning for the Web (SSL'21) @ the Web Conference 2021 (WWW'21).
28 stars 6 forks source link

AttributeError: 'ClusterData' object has no attribute 'partptr' #5

Open Zheng4100 opened 6 months ago

Zheng4100 commented 6 months ago

An error occurred while running your code. Use "def process_cluster_data(self, data):"

Traceback (most recent call last): File "C:\Users\123\Desktop\SelfGNN-main\src\train.py", line 270, in main() File "C:\Users\123\Desktop\SelfGNN-main\src\train.py", line 266, in main train_eval(args) File "C:\Users\123\Desktop\SelfGNN-main\src\train.py", line 257, in train_eval trainer = ModelTrainer(args) # 创建一个ModelTrainer对象,用于训练和评估模型 File "C:\Users\123\Desktop\SelfGNN-main\src\train.py", line 22, in init self._init() File "C:\Users\123\Desktop\SelfGNN-main\src\train.py", line 30, in _init self._dataset = data.Dataset(root=args.root, name=args.name, num_parts=args.init_parts, File "C:\Users\123\Desktop\SelfGNN-main\src\data.py", line 37, in init super().init(root=osp.join(root, name), transform=transform, pre_transform=pre_transform) File "C:\Users\123\anaconda3\envs\Py39_Tor1.9\lib\site-packages\torch_geometric\data\in_memory_dataset.py", line 82, in init super().init(root, transform, pre_transform, pre_filter, log, File "C:\Users\123\anaconda3\envs\Py39_Tor1.9\lib\site-packages\torch_geometric\data\dataset.py", line 118, in init self._process() File "C:\Users\123\anaconda3\envs\Py39_Tor1.9\lib\site-packages\torch_geometric\data\dataset.py", line 263, in _process self.process() File "C:\Users\123\Desktop\SelfGNN-main\src\data.py", line 62, in process data_list = self.process_cluster_data(data) File "C:\Users\123\Desktop\SelfGNN-main\src\data.py", line 112, in process_cluster_data for i in range(1, cd.partptr.shape[0]): AttributeError: 'ClusterData' object has no attribute 'partptr'

zekarias-tilahun commented 6 months ago

Hello, thank you for checking out the code. This probably is a version issue. Please try PyG 1.6

Zheng4100 commented 6 months ago

thank you