dgl icon indicating copy to clipboard operation
dgl copied to clipboard

[Feature] K-hop subgraph sampling with support for heterogeneous directed graphs

Open ali6947 opened this issue 1 year ago • 7 comments

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

ali6947 avatar Dec 13 '23 15:12 ali6947

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Dec 13 '23 15:12 dgl-bot

Commit ID: 8d0671b7da319f2d5dd1eb1125665462dfbdfc44

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Dec 13 '23 15:12 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Dec 15 '23 04:12 dgl-bot

Commit ID: 9b783ecbf5f7b4ed4ae872d759f663d253d42f83

Build ID: 2

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Dec 15 '23 04:12 dgl-bot

@dgl-bot

czkkkkkk avatar Jan 11 '24 02:01 czkkkkkk

@ali6947 Thanks for the contribution. We will discuss how to proceed for this PR.

czkkkkkk avatar Jan 11 '24 02:01 czkkkkkk

Commit ID: 300293475b108f8da25046e88d718696f52a107f

Build ID: 3

Status: ❌ CI test failed in Stage [Lint Check].

Report path: link

Full logs path: link

dgl-bot avatar Jan 11 '24 02:01 dgl-bot