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

Fix from_pandas_edgelist with duplicate edges #4653

Closed

Conversation

eriknw
Copy link
Contributor

@eriknw eriknw commented Sep 17, 2024

When creating a Graph or DiGraph, duplicate edges should be dropped. Also, ensure arrays are contiguous when creating the PLC graph, which can lead to incorrect results.

For now, this was done by splitting out functionality from relabel_nodes, but I wonder if there could be a faster way to deduplicate when edge values also need handled.

Also, cp.unique was sometimes problematic for me on larger data sets, but I may have been running out of device memory. @rlratzel I'm curious how this will perform for you.

When creating a `Graph` or `DiGraph`, duplicate edges should be dropped.
Also, ensure arrays are contiguous when creating the PLC graph,
which can lead to incorrect results.
@eriknw eriknw requested review from a team as code owners September 17, 2024 20:26
@eriknw eriknw requested a review from bdice September 17, 2024 20:26
@eriknw eriknw added bug Something isn't working non-breaking Non-breaking change nx-cugraph labels Sep 18, 2024
@eriknw
Copy link
Contributor Author

eriknw commented Sep 18, 2024

I added a workaround for cupy/cupy#8326: we now use np.unique when axis= is not None.

@rlratzel
Copy link
Contributor

Thanks again for working on this, @eriknw . I'm going to close it now since this fix has been merged, but feel free to re-open or create a new PR if other changes in this PR need to be done for 24.10.

@rlratzel rlratzel closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change nx-cugraph python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants