文件历史

提交图

705 次代码提交

作者 SHA1 备注 提交日期
Jinjing Zhou 987db374fd Fix for distributed training (#3542)
* tmp fix

* add description
2021-12-06 18:35:29 +08:00
Israt Nisa 490c5a8d72 [Model] RGCN with new heterograph API (#3025)
* rgcn with new heterograph API

* added new apply_edge()

* optimized forward pass

* renaming from *hetero to *heteroAPI

Co-authored-by: Israt Nisa <nisisrat@amazon.com>
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-11-30 12:59:35 -08:00
Jinjing Zhou da53275a17 Fix tgn example (#3543) 2021-11-29 14:58:38 +08:00
Rhett Ying cd6d113874 [BugFix] fix dimension unmatch issue and legacy issue of torchtext (#3539) 2021-11-24 15:08:06 +08:00
Harsh Sinha 4bf70f0941 [Bugfix] issue #3527 (#3528)
* Fix issue 3527

* Changed default device

* Added g to device
2021-11-23 08:52:26 +08:00
Mufei Li 9e7fbf9567 [NN] JumpingKnowledge (#3512)
* Update

* Fix
2021-11-19 16:37:25 +08:00
Krzysztof Sadowski 81915f5591 [Examples] RGCN Heterogeneous on ogbn-mag (#3371)
* upload

* cleanup of unused code

* default gpu training/inference

* layer norm instead of batch norm

* fix for default inference mode

* simplified embedding forward method

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-11-18 00:05:24 +08:00
Quan (Andy) Gan b8ce0f41a3 [Sampling] Cluster-GCN and ShaDow-GNN DataLoader (#3487)
* first commit

* next commit

* third commit

* add ShaDow-GNN sampler and unit tests

* fixes

* lint

* cr*p

* lint

* fix lint

* fixes and more unit tests

* more tests

* fix docs

* lint

* fix

* fix

* fix

* fixes

* fix doc
2021-11-16 13:16:25 +08:00
Yuchen 7c771d0d6c [BugFix] fix #3429 and update results of caregnn (#3441)
* squeeze node labels in FraudDataset

* fix RLModule

* update results in README.md

* fix KeyError in full graph training

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-11-10 16:00:12 +08:00
yifeim fe6e01ad10 [Model] Lda subgraph (#3206)
* add word_ids and simplify

* simplify

* add word_ids to be removed later

* remove word_ids

* seems to work

* tweak

* transpose word_z

* add word_ids example

* check api compatibility

* improve compatibility

* update doc

* tweak verbose

* restore word_z layout; tweak

* tweak

* tweak doc

* word_cT

* use log_weight and some other tweaks

* rewrite README

* update equations

* rewrite for clarity and pass tests

* tweak

* bugfix import

* fix unit test

* fix mult to be the same as old versions

* tweak

* could be a bugfix

* 0/0=nan

* add doc_subgraph utility function

* minor cache optimization

* minor cache tweak

* add environmental variable to trade cache speed for memory

* update README

* tweak

* add sparse update pass unit test

* simplify sparse update

* improve low-memory efficiency

* tweak

* add sample expectation scores to allow resampling

* simplify

* update comment

* avoid edge cases

* bugfix pred scores

* simplify

* add save function

Co-authored-by: Yifei Ma <yifeim@amazon.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-11-08 17:44:04 +08:00
Rhett Ying 2a757d4aab Remove self-loops and duplicate edges before ParMETIS and restore when converting to DGLGraph (#3472)
* save self-loops and duplicated edges separately.

* [BugFix] sort graph by dgl.ETYPE

* fix bugs in verify script

* fix verify logic

* refine README

Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-11-08 11:17:19 +08:00
Shaked Brody e2f33fd5cc [NN][Model] GATv2 (#3473)
* [Model][Core] GATv2

* lint

* gatv2conv.py

* lint

* lint

* style and docs

* lint

* gatv2conv fix

Co-authored-by: Shaked Brody shakedbr@campus.technion.ac.il <shakedbr@tangerine.cslcs.technion.ac.il>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-11-03 21:55:56 +08:00
Hongyu Cai 579cd3eb49 Update README.md (#3442) 2021-10-26 14:55:09 +08:00
Xin Yao a8c81018c5 [Sampling] Implement dgl.compact_graphs() for the GPU (#3423)
* gpu compact graph template

* cuda compact graph draft

* fix typo

* compact graphs

* pass unit test but fail in training

* example using EdgeDataLoader on the GPU

* refactor cuda_compact_graph and cuda_to_block

* update training scripts

* fix linting

* fix linting

* fix exclude_edges for the GPU

* add --data-cpu & fix copyright
2021-10-20 22:07:35 -07:00
HaoWei-TomTom f703941840 [Bugfix][Pytorch] Fix model save and load bug of stgcn_wave (#3303)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-10-18 16:17:54 +08:00
Christian Clauss 04ed6126b5 [Fix] Use ==/!= to compare constant literals (str, bytes, int, float, tuple) (#3415)
* Use ==/!= to compare constant literals (str, bytes, int, float, tuple)

Avoid Syntax Warnings on Python >= 3.8

$ `python3`
```
>>> "" == ""
True
>>> "" is ""
<stdin>:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
True
```

* Use ==/!= to compare constant literals (str, bytes, int, float, tuple)
2021-10-14 17:35:37 +08:00
K aef96dfa34 [Model] Refine GraphSAINT (#3328)
* The start of experiments of Jiahang Li on GraphSAINT.

* a nightly build

* a nightly build

Check the basic pipeline of codes. Next to check the details of samplers , GCN layer (forward propagation) and loss (backward propagation)

* a night build

* Implement GraphSAINT with torch.dataloader

There're still some bugs with sampling in training procedure

* Test validity

Succeed in testing validity on ppi_node experiments without testing other setup.
1. Online sampling on ppi_node experiments performs perfectly.
2. Sampling speed is a bit slow because the operations on [dgl.subgraphs], next step is to improve this part by putting the conversion into parallelism
3. Figuring out why offline+online sampling method performs bad, which does not make sense
4. Doing experiments on other setup

* Implement saint with torch.dataloader

Use torch.dataloader to speed up saint sampling with experiments. Except experiments on too large dataset Amazon, we've done some experiments on other four datasets including ppi, flickr, reddit and yelp. Preliminary experimental results show consumed time and metrics reach not bad level. Next step is to employ more accurate profiler which is the line_profiler to test consumed period, and adjust num_workers to speed up sampling procedures on same certain datasets faster.

* a nightly build

* Update .gitignore

* reorganize codes

Reorganize some codes and comments.

* a nightly build

* Update .gitignore

* fix bugs

Fix bugs about why fully offline sampling and author's version don't work

* reorganize files and codes

Reorganize files and codes then do some experiments to test the performance of offline sampling and online sampling

* do some experiments and update README

* a nightly build

* a nightly build

* Update README.md

* delete unnecessary files

* Update README.md

* a nightly update

1. handle directory named 'graphsaintdata'
2. control graph shift between gpu and cpu related to large dataset ('amazon')
3. remove parameter 'train'
4. refine annotations of the sampler
5. update README.md including updating dataset info, dependencies info, etc

* a nightly update

explain config differences in TEST part
remove a sampling time variant
make 'online' an argument
change 'norm' to 'sampler'
explain parameters in README.md

* Update README.md

* a nightly build

* make online an argument
* refine README.md
* refine codes of `collate_fn` in sampler.py, in training phase only return one subgraph, no need to check if the number of subgraphs larger than 1

* Update sampler.py

check the problem on flickr is about overfitting.

* a nightly update

Fix the overfitting problem of `flickr` dataset. We need to restrict the number of subgraphs (also the number of iterations) used in each epoch of training phase. Or it might overfit when validating at the end of each epoch. The method to limit the number is a formula specified by the author.

* Set up a new flag `full` specifying if the number of subgraphs used in training phase equals to that of pre-sampled subgraphs

* Modify codes and annotations related the new flag

* Add a new parameter called `node_budget` in the base class `SAINTSampler` to compute the specific formula

* set `gpu` as a command line argument

* Update README.md

* Finish the experiments on Flickr, which is done after adding new flag `full`

* a nightly update

* use half of edges in the original graph to do sampling
* test dgl.random.choice with or without replacement with half of edges
~ next is to test what if put the calculating probability part out of __getitem__ can speed up sampling and try to implement sampling method of author

* employ cython to implement edge sampling for per edge

* employ cython to implement edge sampling for per edge
* doing experiments to test consumed time and performance
** the consumed time decreased to approximately 480s, the performance decrease about 5 points.
* deprecate cython implementation

* Revert "employ cython to implement edge sampling for per edge"

* This reverts commit 4ba4f092
* Deprecate cython implementation
* Reserve half-edges mechanism

* a nightly update

* delete unnecessary annotations

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-10-07 19:06:28 +08:00
Junwen Yao 367a3a34c4 Fix torch import in example (#3372) 2021-09-23 13:23:05 +08:00
Vikram Sharma ac9261b2a0 [Doc] Added md5sum info for OGB-LSC dataset (#3332)
* Added md5sum for the large dataset files

md5sum helps in validating the correctness of large dataset files once downloaded. 

Refer: https://github.com/snap-stanford/ogb/issues/253
2021-09-21 22:36:53 +08:00
nv-dlasalle 01a2214430 Enable faster validation for pytorch graphsage example (#3361) 2021-09-19 17:25:46 -07:00
esang 3fef5d27d3 [Model] PCT (#3339)
* publish pct

* add train_cls

* add readme

* update opt for point transformer

* update the example index

* update for comments

Co-authored-by: Tong He <hetong007@gmail.com>
2021-09-13 17:17:24 +08:00
skepsun 26b631805f [Bugfix] Fix Correct&Smooth (#3329)
* Update model.py

fix typo

* Update main.py

fix autoscale

* Update README.md

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-09-13 11:46:14 +08:00
xiang song(charlie.song) 21a4027969 Fix distributed device mapping problem. (#3313)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-2-66.ec2.internal>
2021-09-02 13:52:00 +08:00
esang 4fb50be4d9 [Model] Point transformer (#3284)
* some modifications for pointnet2

* temporarily save changes

* move files to new directory point_transformer

* implement point transformer for classification

* restore train_cls in pointnet

* implement point transformer for partseg

* fix point transformer for nan loss

* modify point transformer for cls

* modify training setting

* update transformer for cls

* update code

* update code for latest performance

* update the example index

* some minor changes

Co-authored-by: Tong He <hetong007@gmail.com>
2021-08-27 14:33:18 +08:00
Quan (Andy) Gan b4cd60a952 fix relgraphconv bug (#3256) 2021-08-23 17:29:14 +08:00
Peiqi Yin f5b410b72d GeniePath model add a Tanh. (#3269)
* Update model.py

* Update README.md

Co-authored-by: Zihao Ye <expye@outlook.com>
2021-08-20 22:06:00 +08:00
maqy ea06688ed2 [Model] add model example EvolveGCN. (#3190)
* add evolveGCN example

* small fix

* fix defect

* fix defect

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-08-19 14:14:55 +08:00
Peiqi Yin 68c0cfbb3c [Model] Fix diffpool loss (#3233) 2021-08-16 15:18:15 +08:00
JOHNW02 738b75f41e [example] Create EEG-GCNN example. (#3186)
* Create EEG-GCNN example.

* Update README.md

* Remove gitignore file.

* Update README.md

* change 'datas' to 'datasets'.

* Change train.py to main.py

* Added an entry in the indexing page.

* State "simplified version"; change how to run.

* Fix bug in contact

* Remove paper link in reference.

* Create working branch

* Add normalization of x.

* Update paper link and tags

* Update paper link in readme

* Update readme; add patient level indices

* Update readme. Add comments to models

* Update README.md

* change to with; specify location for ch and el; move note

* fix bug for note

* Add args for models; clean code.

* delete = in readme

* Add reference for spec_coh_values
2021-08-11 13:47:59 +08:00
Ankit Garg b131920066 [Feature] Add removed edges in distributed graph partitioning to handle heterogeneous graph (#3137)
* Added code for Rectifying (TypeError: unhashable type: 'slice') when copying file

* 1) added distributed preprocessing code to create ParMetis Input from CSV files
2) add code to run pm_dglpart on multiple machines
3) added support for recreating heteregenous graph from homo geneous graph based on dropped edges, as ParMetis currently only supports homogeneous graphs

* move to pandas

* Added comments and remove drop_duplicates as it was redundant

* Addressed Pr Comments

* Rename variable

* Added comment

* Added comment

* updated ReadMe

Co-authored-by: Ankit Garg <gaank@amazon.com>
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-08-02 11:41:13 -07:00
Kay Liu 39764da491 [model] add model example GeniePath (#3199)
* [model] add model example GeniePath

* improvements based on feedback

* improvements based on feedback

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-07-30 18:09:42 +08:00
KounianhuaDu 6f93c6aa74 fix (#3167)
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-07-30 13:07:22 +08:00
Kay Liu a107993f10 [Model] add model example CARE-GNN (#3187)
* [Model] add model example CARE-GNN

* update README

* improvements based on the review feedback

* fix missing item()

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-07-29 15:24:15 +08:00
Jinjing Zhou 2583ec5934 [Doc] Fix WeightBasis documentation (#3189)
* fix

* fix type

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-07-28 18:56:10 +08:00
xiang song(charlie.song) ba7e7cf931 [New Feature] Per edge type sampler for to_homogeneous graphs. (#3131)
* fix.

* fix.

* fix.

* fix.

* Fix test

* Deprecate old DistEmbedding impl, use synchronized embedding impl

* Basic imple of heterogeneous on homogenenous sampling

* make pass

* Pass C++ test

* Add python test code

* lint

* lint

* Add MultiLayerEtypeNeighborSampler

* Add unitest for single machine dataloader

* Add dist dataloader test for edge type sampler

* Fix lint

* fix

* support for per etype sample

* Fix some bug and enable distributed training with per edge sample

* fix

* Now distributed training works

* turn off some mxnet

* turn off mxnet for some dist test

* fix

* upd

* upd according to the comments

* Fix

* Fix test and now distributed works.

* upd

* upd

* Fix

* Fix bug

* remove dead code.

* upd

* Fix

* upd

* Fix

Co-authored-by: Ubuntu <ubuntu@ip-172-31-71-112.ec2.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-2-66.ec2.internal>
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-07-28 11:51:32 +08:00
Kay Liu 59a7d0d1c0 [Model] add model example GCN-based Anti-Spam (#3145)
* add model example GCN-based Anti-Spam

* update example index

* add usage info

* improvements as per comments

* fix image invisiable problem

* add image file

Co-authored-by: zhjwy9343 <6593865@qq.com>
2021-07-24 23:33:25 +08:00
Tianjun Xiao c0719ec574 train test on face use concat bce (#3180) 2021-07-24 20:49:09 +08:00
Tianjun Xiao 65ecbb9492 change numbers to concat bce (#3175) 2021-07-23 12:54:28 +08:00
Minjie Wang 9d56d386c8 [Doc] Update the example folder README 2021-07-20 19:12:06 +08:00
Da Zheng 34426a98e9 [Distributed] Distributed heterograph training (#3069)
* support hetero RGCN.

* fix.

* simplify code.

* sample_neighbors return heterograph directly.

* avoid using to_heterogeneous.

* compute canonical etypes in advance.

* fix tests.

* fix.

* fix distributed data loader for heterograph.

* use NodeDataLoader.

* fix bugs in partitioning on heterogeneous graphs.

* fix lint.

* fix tests.

* fix.

* fix.

* fix bugs.

* fix tests.

* fix.

* enable coo for distributed.

* fix.

* fix.

* fix.

* fix.

* fix.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-71-112.ec2.internal>
Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
2021-07-17 10:57:00 +08:00
David Min 905c0aa578 [Feature][Performance][GPU] Introducing UnifiedTensor for efficient zero-copy host memory access from GPU (#3086)
* Add pytorch-direct version

* Initial commit of unified tensor

* Merge branch 'master' of https://github.com/davidmin7/dgl

* Remove unnecessary things

* Fix error message

* Fix/Add descriptions

* whitespace fix

* add unpin

* disable IndexSelectCPUFromGPU with no CUDA

* add a newline for unified_tensor.py

* Apply changes based on feedback

* add 'os' module

* skip unified tensor unit test for cpu only

* Update tests/pytorch/test_unified_tensor.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>

* reflect feedback

Co-authored-by: shhssdm <shhssdm@gmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-07-17 00:06:20 +08:00
Jinjing Zhou 88f20eec4e fix tags (#3140)
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-07-15 11:02:44 +08:00
Mufei Li 3f6f694159 [Bug fix] Various fix from bug bash (#3133)
* Update

* Update

* Update dependencies

* Update

* Update

* Fix ogbn-products gat

* Update

* Update

* Reformat

* Fix typo in node2vec_random_walk

* Specify file encoding

* Working for 6.7

* Update

* Fix subgraph

* Fix doc for sample_neighbors_biased

* Fix hyperlink

* Add example for udf cross reducer

* Fix

* Add example for slice_batch

* Replace dgl.bipartite

* Fix GATConv

* Fix math rendering

* Fix doc

Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-17.us-west-2.compute.internal>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-22-156.us-west-2.compute.internal>
2021-07-15 09:17:15 +08:00
xiang song(charlie.song) d7390763f0 [Distributed] Deprecate old DistEmbedding impl, use synchronized embedding impl (#3111)
* fix.

* fix.

* fix.

* fix.

* Fix test

* Deprecate old DistEmbedding impl, use synchronized embedding impl

* update doc

Co-authored-by: Ubuntu <ubuntu@ip-172-31-71-112.ec2.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-2-66.ec2.internal>
Co-authored-by: Da Zheng <zhengda1936@gmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-07-14 00:15:53 +08:00
Wilfried L. Bounsi ee6bc95175 Update a comment in pytorch HGT example (#3101)
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-07-13 19:09:17 +08:00
Quan (Andy) Gan b576e617ad [Feature] Add left normalizer for GCN (#3114)
* add left normalizer for gcn

* fix

* fixes and some bug stuff
2021-07-13 12:49:35 +08:00
Kay Liu 0ce92a86ed [BugFix] fix problems found in bug bash (#3116)
* fix breakline in fakenews.py

* fix inconsistent argument name

* modify incorrect example and deprecated graph type

* modify docstring and example in knn_graph

* fix incorrect node type

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-07-12 13:34:50 +08:00
Jinjing Zhou 3641829211 fix docs (#3126)
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-07-12 11:43:15 +08:00
Tomohiro Endo fc55225f08 Fix module name (#3128) 2021-07-12 11:15:02 +08:00
Quan (Andy) Gan 5798ee8d98 [Performance] Add a warning for ChebConv (#3099)
* add a warning for chebconv

* fix and docstrings

* update bgnn

* fix

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-07-09 14:49:15 +08:00