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

Graphs have parallel edges #11

Open
iamgroot42 opened this issue Jul 2, 2021 · 1 comment
Open

Graphs have parallel edges #11

iamgroot42 opened this issue Jul 2, 2021 · 1 comment

Comments

@iamgroot42
Copy link
Contributor

It seems the data pre-processing does not convert the graphs to simple graphs. Even though they are undirected and unweighted, some nodes in the graphs have multiple parallel edges. This bug seems to impact graphs loaded via torch_geometric and dgl - networkx already handles this.

Thankfully, the number of such parallel edges is not significant - I did a quick check on the train and validation set, and the graphs have ~ 11 extra parallel edges on average. Not a big issue (it should not impact model performance or results in any way), though.

@jzhou316
Copy link
Collaborator

Hi @iamgroot42 thanks for pointing this out! We saw your pull request and will merge it. Otherwise, torch_geometric also has a data method to check or remove multi-edges, and multi-edges could also be useful in other contexts (e.g. when there are different edge labels, or when the number of multi-edges represents the frequency or importance of that edge when we superpose edges at different times into a single graph).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants