I am running the code from this repository Link with dgl==0.1.3
and I am facing this error. I am not sure why its coming. I have attached the code snippet and the error below.
code snippet
def _prepare_subgraphs(self, nodes, r_label, n_labels):
subgraph = dgl.DGLGraph(self.graph.subgraph(nodes))
Error
Traceback (most recent call last):
File "train.py", line 222, in <module>
main(params)
File "train.py", line 32, in main
kge_model=params.kge_model, file_name=params.train_file)
File "/home2/harsha.vasamsetti/SumGNN-master_olddgl/subgraph_extraction/datasets.py", line 142, in __init__
self.__getitem__(0)
File "/home2/harsha.vasamsetti/SumGNN-master_olddgl/subgraph_extraction/datasets.py", line 150, in __getitem__
subgraph_pos = self._prepare_subgraphs(nodes_pos, r_label_pos, n_labels_pos)
File "/home2/harsha.vasamsetti/SumGNN-master_olddgl/subgraph_extraction/datasets.py", line 159, in _prepare_subgraphs
subgraph = dgl.DGLGraph(self.graph.subgraph(nodes))
File "/home2/harsha.vasamsetti/.miniconda3/envs/sumgnn=0.1.3/lib/python3.7/site-packages/dgl/graph.py", line 181, in __init__
self._graph = create_graph_index(graph_data, multigraph, readonly)
File "/home2/harsha.vasamsetti/.miniconda3/envs/sumgnn=0.1.3/lib/python3.7/site-packages/dgl/graph_index.py", line 925, in create_graph_index
% type(graph_data))
dgl._ffi.base.DGLError: Error while creating graph from input of type "<class 'dgl.subgraph.DGLSubGraph'>".