Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] DGLSubGraph.map_to_subgraph_nid error in v0.3 #717

Closed
mindlack opened this issue Jul 18, 2019 · 2 comments · Fixed by #946
Closed

[Bug] DGLSubGraph.map_to_subgraph_nid error in v0.3 #717

mindlack opened this issue Jul 18, 2019 · 2 comments · Fixed by #946
Assignees
Labels
bug:confirmed Something isn't working

Comments

@mindlack
Copy link

Hello,

The method map_to_subgraph_nid from DGLSubGraph seems to malfunction.

The following example code:
import dgl
g=dgl.DGLGraph()
g.add_nodes(10)
h=g.subgraph([0,1,2,5,8])
h.map_to_subgraph_nid([0,8,2])

produces the following error chain:
File “.../python3.6/dist-packages/dgl/subgraph.py”, line 139, in map_to_subgraph_nid
return map_to_subgraph_nid(self._graph,utils.toindex(parent_vids)).tousertensor()
File “.../python3.6/dist-packages/dgl/graph_index.py”, line 1137, in map_to_subgraph_nid
return utils.toindex(_CAPI_DGLMapSubgraphNID(subgraph.induced_nodes.todgltensor(),
AttributeError: ‘GraphIndex’ object has no attribute ‘induced_nodes’

This bug does not occur in version 0.2 . The main difference I have found was that in v0.2 (in my code), type(h._graph) was
<class ‘dgl.graph_index.SubGraphIndex’>, instead of
<class ‘dgl.graph_index.GraphIndex’> as it is in v0.3 .

Am I using the library incorrectly? Is this behavior intended? If so, is there a replacement for the method?
Or is it a bug?

Thanks!

@jermainewang
Copy link
Member

Thanks for reporting. Bug confirmed.

@jermainewang jermainewang added the bug:confirmed Something isn't working label Jul 18, 2019
@jermainewang jermainewang self-assigned this Jul 18, 2019
@jermainewang jermainewang changed the title Issue with DGLSubGraph.map_to_subgraph_nid in v0.3 [Bug] DGLSubGraph.map_to_subgraph_nid error in v0.3 Jul 18, 2019
@lgalke
Copy link

lgalke commented Oct 22, 2019

Hey @jermainewang, is there a way I could contribute to fix this issue? This issue prevents me from upgrading beyond 0.2

BarclayII added a commit to BarclayII/dgl that referenced this issue Oct 23, 2019
BarclayII added a commit that referenced this issue Oct 28, 2019
* [BUG] Fix #717

* fix mxnet test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants