Open 24kobebryant opened 3 years ago
Can you test the node2vec.py
example that is provided with PyG 1.6.1, see here?
Can you test the
node2vec.py
example that is provided with PyG 1.6.1, see here?
Okay, I'll try it tonight.
Can you test the
node2vec.py
example that is provided with PyG 1.6.1, see here?
I have tried this link. Then also occurs this problem:
Traceback (most recent call last):
File "test2.py", line 42, in <module>
loss = train()
File "test2.py", line 23, in train
for pos_rw, neg_rw in loader:
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch
return self.collate_fn(data)
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch_geometric/nn/models/node2vec.py", line 116, in sample
return self.pos_sample(batch), self.neg_sample(batch)
File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch_geometric/nn/models/node2vec.py", line 97, in pos_sample
walks.append(rw[:, j:j + self.context_size])
TypeError: tuple indices must be integers or slices, not tuple
Can you test the
node2vec.py
example that is provided with PyG 1.6.1, see here?I have tried this link. Then also occurs this problem:
Traceback (most recent call last): File "test2.py", line 42, in <module> loss = train() File "test2.py", line 23, in train for pos_rw, neg_rw in loader: File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__ data = self._next_data() File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data return self._process_data(data) File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data data.reraise() File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop data = fetcher.fetch(index) File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch_geometric/nn/models/node2vec.py", line 116, in sample return self.pos_sample(batch), self.neg_sample(batch) File "/home/mengxinkai-20/anaconda3/envs/autogrl/lib/python3.7/site-packages/torch_geometric/nn/models/node2vec.py", line 97, in pos_sample walks.append(rw[:, j:j + self.context_size]) TypeError: tuple indices must be integers or slices, not tuple
Does the pytorch version have to be 1.6 ?
PyG 1.6.1 was indeed released for PyTorch 1.6, and only later versions might be able to support PyTorch 1.7.0. If there is any possibility, you can either try to upgrade PyG to a later release, or downgrade PyTorch to 1.6.
PyG 1.6.1 was indeed released for PyTorch 1.6, and only later versions might be able to support PyTorch 1.7.0. If there is any possibility, you can either try to upgrade PyG to a later release, or downgrade PyTorch to 1.6.
Thank u, I'll try to upgrade PyG to a later release and then run this code again. As for downgrading PyTorch version, 3090 don't support Pytorch 1.6.
Hi, I'm going to test the official node2vec example but I got an error as follows:
The example runs smoothly on pytorch 1.6, but the error above occurs on pytorch 1.7, so I assume this is a pytorch issue? Here are the version of the librarys:
Looking forward to your reply!