Traceback (most recent call last):
File "/*****/****/rgcn_link_pred.py", line 23, in <module>
dataset = RelLinkPredDataset(path, 'FB15k-237')
File "/******/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/datasets/rel_link_pred_dataset.py", line 54, in __init__
super().__init__(root, transform, pre_transform)
File "/*******/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/data/in_memory_dataset.py", line 57, in __init__
super().__init__(root, transform, pre_transform, pre_filter, log)
File "/********/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/data/dataset.py", line 97, in __init__
self._process()
File "/*******/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/data/dataset.py", line 230, in _process
self.process()
File "/******/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/datasets/rel_link_pred_dataset.py", line 98, in process
rel = [relations_dict[row[1]] for row in lines]
File "/********/miniconda3/envs/pykeendemo/lib/python3.10/site-packages/torch_geometric/datasets/rel_link_pred_dataset.py", line 98, in <listcomp>
rel = [relations_dict[row[1]] for row in lines]
KeyError: '/location/country/form_of_government'
Environment
PyG version: 2.3.1
PyTorch version:1.12.1
OS:ubantu 20.04
Python version:3.10
CUDA/cuDNN version:11.5
How you installed PyTorch and PyG (conda, pip, source):conda
Any other relevant information (e.g., version of torch-scatter):
Mh, this works for me. Wondering what might cause this. Can you remove the {root_dir}/raw directory (where you store the dataset) and try again? There might have been an issue with the downloaded files.
🐛 Describe the bug
hi i run the code in https://github.com/pyg-team/pytorch_geometric/blob/master/examples/rgcn_link_pred.py, it reported the error as follows(*** for mask path, please ignore):
Environment
conda
,pip
, source):condatorch-scatter
):