dgl icon indicating copy to clipboard operation
dgl copied to clipboard

[Example] fixing TGN example

Open amarzullo24 opened this issue 1 year ago • 6 comments

Description

Attempt to fix the example: Temporal Graph Network (TGN) refer to #5452 #3536 #5456

Checklist

Please feel free to remove inapplicable items for your PR.

  • [x] The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • [ ] 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).
  • [ ] 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
  • [x] Related issue is referred in this PR
  • [ ] If the PR is for a new model/paper, I've updated the example index here.

Changes

TGN example was removed due to compatibility issues with recent DGL versions (https://github.com/dmlc/dgl/blob/master/examples/pytorch/tgn) This PR contains simple fixes to adapt the dataloader

Tested by running in fast mode:

python train.py --dataset wikipedia --fast_mode

Obtained performance is comparable with the one reported in the previous version:

Batch:  462 Time:  0.11104059219360352
Batch:  463 Time:  0.13099265098571777
Batch:  464 Time:  0.11907100677490234
Batch:  465 Time:  0.11619687080383301
Batch:  466 Time:  0.11682605743408203
Batch:  467 Time:  0.12520647048950195
Batch:  468 Time:  0.10740518569946289
Batch:  469 Time:  0.11810636520385742
Batch:  470 Time:  0.033731937408447266
Epoch: 49; Training Loss: 28394.831434637308 | Validation AP: 0.985 AUC: 0.987
 Epoch: 49; Test AP: 0.983 AUC: 0.987
 Epoch: 49; Test New Node AP: 0.980 AUC: 0.983

========Training is Done========

amarzullo24 avatar Nov 26 '23 18:11 amarzullo24

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

  • @dgl-bot

dgl-bot avatar Nov 26 '23 18:11 dgl-bot

Commit ID: c64592b86240826625ae1080a57fe69be280aed8

Build ID: 1

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

Report path: link

Full logs path: link

dgl-bot avatar Nov 26 '23 18:11 dgl-bot

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

  • @dgl-bot

dgl-bot avatar Nov 30 '23 15:11 dgl-bot

Commit ID: 538386befbb4b4b4d48d8edac6c17ee888d84c4f

Build ID: 2

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

Report path: link

Full logs path: link

dgl-bot avatar Nov 30 '23 15:11 dgl-bot

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

  • @dgl-bot

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

Commit ID: a60aa2298edb28877a634e2b0f6e8a46ccf1bff6

Build ID: 3

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

Report path: link

Full logs path: link

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