-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Feature] Max readout and consecutive labeling for networkx #341
Conversation
@mufeili does the |
i see, i've read the code before |
I think later on we will need to replace the for loop in |
@BarclayII I agree, this is just a very naive workaround. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some minor comments.
Great! Thanks Murphy. |
Description
Checklist
Please feel free to remove inapplicable items for your PR.
or have been fixed to be compatible with this change
Changes
max_nodes
andmax_edges
inbatched_graph.py
. A more efficient implementation will requiresegment_max
. The test cases are provided intests/pytorch/test_readout.py
DGLGraph
object from a networkx graph with non-consecutive node labels, we relabel the nodes using consecutive integers first before converting it into aDGLGraph
. The changes arefrom_networkx
ingraph.py
,graph_index.py
,immutable_graph_index.py
. The test cases are provided intests/compute/test_basics.py
.from_networkx
ofgraph.py
, I also convert the networkx graph to be directed first, otherwise only half of theDGLGraph
edges will have features.