cugraph icon indicating copy to clipboard operation
cugraph copied to clipboard

[BUG] PG has_duplicates does not check for type

Open VibhuJawa opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug Currently in PG we only check only for src, dst but not type, we should check for all three as we support muti-edges in PG and below fails a check for mutli-edges.

https://github.com/rapidsai/cugraph/blob/6632d1e99e2adb8dbfb96beced6fd7755c0d7056/python/cugraph/cugraph/structure/property_graph.py#L1014-L1027

VibhuJawa avatar Aug 17 '22 17:08 VibhuJawa

Looking more closely at this, and I think the current behavior as used by extract_subgraph and edge_props_to_graph might be correct (at least per my understanding).

If there are multiple edges with the same src and dst, then this is a multigraph even if they have different types, right? Then, you need to indicate allow_multi_edges=True in extract_subgraph. Is my understanding of how cugraph handles this correct?

Do you use has_duplicate_edges anywhere else?

eriknw avatar Sep 13 '22 20:09 eriknw

If there are multiple edges with the same src and dst, then this is a multigraph even if they have different types, right?

Unsure, @rlratzel , Can you confirm this behavior ?

VibhuJawa avatar Sep 13 '22 23:09 VibhuJawa