dgl
dgl copied to clipboard
[Feature] K-hop subgraph sampling with support for heterogeneous directed graphs
Description
Here is an API for sampling a k-hop subgraph around a node in a heterogenous directed graph. Prior to this, there was an API for only in-subgraph
and out-neighborhood
but we add support of for traversing edges in both directions when sampling the subgraph. This is useful for extracting heterogenous subgraphs around a node for training GNNs
Checklist
Please feel free to remove inapplicable items for your PR.
- [x] The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
- [x] I've leverage the tools to beautify the python and c++ code.
- [x] The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
- [x] All changes have test coverage
- [x] Code is well-documented
- [x] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
Changes
- API Implementation of the function
khop_subgraph
- Tests added
- Documentation provided
Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:
-
@dgl-bot
Commit ID: 8d0671b7da319f2d5dd1eb1125665462dfbdfc44
Build ID: 1
Status: ❌ CI test failed in Stage [Authentication].
Report path: link
Full logs path: link
Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:
-
@dgl-bot
Commit ID: 9b783ecbf5f7b4ed4ae872d759f663d253d42f83
Build ID: 2
Status: ❌ CI test failed in Stage [Authentication].
Report path: link
Full logs path: link
@dgl-bot
@ali6947 Thanks for the contribution. We will discuss how to proceed for this PR.