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.38k stars 3k forks source link

remove multiple nodes/edges types simultaneously from heterograph #3387

Open Rhett-Ying opened 2 years ago

Rhett-Ying commented 2 years ago

🚀 Feature

Request from user: https://discuss.dgl.ai/t/how-to-remove-multiple-types-of-nodes-simultaneously-with-eid-stored/2366/1. For now, https://docs.dgl.ai/en/latest/generated/dgl.remove_nodes.html#dgl.remove_nodes supports single type only. so does remove_edges.

Motivation

one want to remove multiple node types simultaneously and store original nids/eids. For now, we have to remove one by one in iterations and have to keep track of original nids/eids. If we want to query real original nids/eids, just walk backward. This is a bit inconvenient.

Alternatives

Pitch

Additional context

Rhett-Ying commented 2 years ago

need more discussion.