pytorch_geometric icon indicating copy to clipboard operation
pytorch_geometric copied to clipboard

The function from_networkx is very slow when edge properties are present

Open sbonner0 opened this issue 4 years ago • 6 comments

I have been using from_networkx on a relatively large graph (45K vertecies and 2M edges) without runtime issues - the conversion happens within a minute or so. However, as soon as a single edge property is present, the runtime becomes incredibly slow. Looking into the code for the function, it seems that it is the second set of loops (the ones over the edges) that is causing the issues.

Any tips on how to fix this, or can the same thing be achieved by perhaps copying the edge property into pytorch beforehand?

sbonner0 avatar Sep 23 '20 13:09 sbonner0