Error when using the GraphConv in homogenous graphs.
- Dominant language
- Python
- Stars
- 14.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
This line will fail in mini-batch training if the graph has one relation type and one node type.
https://github.com/dmlc/dgl/blob/92e77330659fe0f5673c76b966aad727752cb7ef/python/dgl/nn/pytorch/conv/graphconv.py#L399
See the stack trace bellow
File "/opt/conda/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ivasilei/m5-gnn/python/m5gnn/model/rgcn_encoder.py", line 225, in forward
h = layer(block, h)
File "/opt/conda/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/nn/pytorch/conv/graphconv.py", line 399, in forward
feat_src, feat_dst = expand_as_pair(feat, graph)
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/utils/internal.py", line 580, in expand_as_pair
input_dst = {
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/utils/internal.py", line 581, in
k: F.narrow_row(v, 0, g.number_of_dst_nodes(k))
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/heterograph.py", line 2414, in number_of_dst_nodes
return self.num_dst_nodes(ntype)
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/heterograph.py", line 2476, in num_dst_nodes
return self._graph.number_of_nodes(self.get_ntype_id_from_dst(ntype))
File "/home/ivasilei/.local/lib/python3.9/site-packages/dgl/heterograph.py", line 1239, in get_ntype_id_from_dst
raise DGLError('DST node type "{}" does not exist.'.format(ntype))
dgl._ffi.base.DGLError: DST node type "node" does not exist.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.