Skip to content

Conversation

@jwzhi
Copy link
Contributor

@jwzhi jwzhi commented Jun 20, 2023

Description

This issue is for extending the function of excluding the training edges in the edge sampler used in the link prediction training.
We develop a new callable excluder object which can be used as an args in dgl.dataloading.as_edge_prediction_sampler.
The example usage is as follows

low_degree_excluder = SpotTarget(g, args.exclude_target_degree)
sampler = as_edge_prediction_sampler(sampler, exclude=low_degree_excluder, reverse_eids=reverse_eids,
                                                      negative_sampler=negative_sampler.Uniform(1))

A more detailed documents and experiment results can be found here #5698.

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • 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).
  • All changes have test coverage
  • Code is well-documented
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
  • Related issue is referred in this PR
  • If the PR is for a new model/paper, I've updated the example index here.

Changes

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jun 20, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jun 20, 2023

Commit ID: ec5d93e

Build ID: 1

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jun 20, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jun 20, 2023

Commit ID: 122a65c

Build ID: 2

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

Report path: link

Full logs path: link

@jwzhi jwzhi changed the title Edge sampler with excluding edges adjacent to low-degree nodes [SpotTarget]Edge sampler with excluding edges adjacent to low-degree nodes Jun 20, 2023
@BarclayII
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jun 25, 2023

Commit ID: 122a65c

Build ID: 3

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

Report path: link

Full logs path: link

@BarclayII
Copy link
Collaborator

BarclayII commented Jun 25, 2023

Also, would you mind add a new unit test? We typically add unit tests of data loading in tests/python/pytorch/dataloading so you could add a test_... function in a new file like tests/python/pytorch/dataloading/test_spot_target.py.

There are also some lint errors in the file. You could fix it with lintrunner -a python/dgl/dataloading/base.py.

@frozenbugs frozenbugs self-requested a review June 26, 2023 05:36
@jwzhi
Copy link
Contributor Author

jwzhi commented Jun 30, 2023

lintrunner -a python/dgl/dataloading/base.py

I will add these features.

Do you have example test functions that I can take a look at. Sorry I haven't written any unit test before and need an example for this.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 11, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 11, 2023

Commit ID: 7e624e6

Build ID: 4

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

Report path: link

Full logs path: link

@BarclayII
Copy link
Collaborator

lintrunner -a python/dgl/dataloading/base.py

I will add these features.

Do you have example test functions that I can take a look at. Sorry I haven't written any unit test before and need an example for this.

Sorry for not responding @jwzhi . An example unit test is https://github.com/dmlc/dgl/blob/master/tests/python/pytorch/dataloading/test_dataloader.py#L727.

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

Commit ID: 59c881f

Build ID: 5

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

Commit ID: a1d67e7

Build ID: 6

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

Report path: link

Full logs path: link

@jwzhi
Copy link
Contributor Author

jwzhi commented Jul 22, 2023

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Jul 22, 2023

Commit ID: 5977b24

Build ID: 7

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

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 24ebe87

Build ID: 22

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

Report path: link

Full logs path: link

@Rhett-Ying
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 24ebe87

Build ID: 23

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: d911e9d

Build ID: 24

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

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 31836b8796def0c9718422808576436c6f183761

Build ID: 25

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 3264dcae7c9373b020c3f805811db43c4b915a5d

Build ID: 26

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

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: e465b49

Build ID: 27

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: e465b49

Build ID: 28

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 18929b9

Build ID: 29

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

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: 18929b9

Build ID: 30

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

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

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

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: d1896a0183557bd25afdf5cf22f521a867b4b7fd

Build ID: 31

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

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 4, 2023

Commit ID: d61b8f95c07a8bc7adf3a07a6d16b5e0b79c76c8

Build ID: 32

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

Copy link
Collaborator

@BarclayII BarclayII left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@BarclayII BarclayII merged commit a1a3ce8 into dmlc:master Aug 4, 2023
Rhett-Ying pushed a commit that referenced this pull request Aug 10, 2023
…nodes (#5893)

Co-authored-by: Quan (Andy) Gan <[email protected]>
Co-authored-by: ZYH <[email protected]>
Co-authored-by: Hongzhi (Steve), Chen <[email protected]>
DominikaJedynak pushed a commit to DominikaJedynak/dgl that referenced this pull request Mar 12, 2024
…nodes (dmlc#5893)

Co-authored-by: Quan (Andy) Gan <[email protected]>
Co-authored-by: ZYH <[email protected]>
Co-authored-by: Hongzhi (Steve), Chen <[email protected]>
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

Successfully merging this pull request may close these issues.

6 participants