dmlc / dgl

Python package built to ease deep learning on graph, on top of existing DL frameworks.
http://dgl.ai
Apache License 2.0
13.48k stars 3.01k forks source link

`node_type_subgraph` ignore batch structure of input graph #2506

Open Junyoungpark opened 3 years ago

Junyoungpark commented 3 years ago

🐛 Bug

To Reproduce

g = dgl.batch([g0,g1,g2])
g.node_type_subgraph(['type1'])
print(g.batch_size)

Expected behavior

I assumed the node_type_subgraph returns the subgraphs of inputs, hence the output g has to have batch size of 3. But it actually give me a single graph.

BarclayII commented 3 years ago

@jermainewang @mufeili Do we have any concrete plan on preserving batch information through graph transformations?

jermainewang commented 3 years ago

This looks like a feature requested by many. Let's open an RFC on this. @BarclayII