Open VibhuJawa opened 2 years ago
There is a transpose
function in the C++ API that will do this efficiently, it is supported by SG and MG.
What we haven't done is discuss what the API should look like from a python perspective.
@rlratzel @alexbarghi-nv - we should discuss this. I believe all of the necessary functionality exists in the C++ layer. I think we need to look at what we'd like the python layer to do here. This probably crosses both cugraph python and GNN logic.
Yeah, I think we need to revisit this. It doesn't really make sense with the new API I'm working on for DGL. For now we can deprioritize it.
Also this issue mentions the property graph object which we abandoned as a backend a long time ago.
Describe the solution you'd like and any additional context
I would like an API to reverse edges for a directed
cugraph.Graph
. This can probably follow the reverse API in networrkx. https://networkx.org/documentation/stable/reference/classes/generated/networkx.DiGraph.reverse.htmlAdditional Context:
When running sampling on a subgraph for DGL we can have two directions
in
andout
. Forin/incoming
direction we need to reverse the subgraph and an API to do this will help us to cleanly use extracted_subgraph API for PG and reverse it.See below for expected usage : https://github.com/rapidsai/cugraph/blob/3e99193f91549cf2af6961e7d1a2968f1cf0de6e/python/cugraph/cugraph/gnn/graph_store.py#L258-L271