文件历史

132 次代码提交

作者 SHA1 备注 提交日期
Sai Kandregula 7ec165c2c5 default value typo fix in GlobalUniform negative sampler (#4060)
Co-authored-by: decoherencer <decoherencer@users.noreply.github.com>
2022-05-28 13:22:41 +08:00
Feiyang(Vance) Chen d70a362dba Update shadow.py (#4034)
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-05-23 19:06:18 +08:00
Quan (Andy) Gan 4c14781427 [Optimization] Memory consumption optimization on index shuffling in dataloader (#3980)
* fix

* revert

* Update dataloader.py
2022-05-14 02:11:01 +08:00
Daniil Sizov 5561af4517 [Feature] Dataloader worker affinitization (#3723)
* PR3355 + CSR conversion workaround

* Remove debug code

* Fix convention errors

* Remove wrongly added code section during merge

* Update to reflect dataloading changes

* Fix missing changes

* Remove comment

* Fix linter errors

* Fix trailing whitespace

* Add wrapper around worker init function

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-04-28 13:00:04 +08:00
Quan (Andy) Gan c3baf4332b [Bug] Fix multi-GPU edge classification crashing with pure GPU sampling (#3946)
* fix

* fix

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-04-27 22:59:21 +08:00
Quan (Andy) Gan e06e63d5d5 [Feature] Enable UVA sampling with CPU indices (#3892)
* enable UVA sampling with CPU indices

* add docs

* add more docs

* lint

* fix

* fix

* better error message

* use mp.Barrier instead of queues

* revert

* revert

* oops

* revert dgl.multiprocessing.spawn

* Update pytorch.py
2022-04-12 20:56:51 +08:00
Quan (Andy) Gan 0d878ff8ef [Example] Cleaned GraphSAGE node classification example with PyTorch Lightning (#3863)
* cleaned pl node classification example

* conform to PL's method of updating the dataloader

* update

* lint

* fix test

* fix
2022-04-12 17:26:23 +08:00
nv-dlasalle baa9292899 [bugfix] Fix EdgePredictionSampler for UVA sampling (#3904)
* Add failing unit test

* Fix negative sampler edge types

* fix test

* oops

* revert

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
2022-04-12 15:25:21 +08:00
Peiqi Yin 23a5e674e7 [fix] device cannot be Nonetype object. (#3822)
* fix device = none to cpu.

* fix singleton-comparison

* modify device is none

* fix use uva

* add docs

* add edge dataloader

* add doc

* fix trailing-whitespace

* modify default

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-04-11 14:58:27 +08:00
Mufei Li 11e910b6f8 [Doc] Hotfix for GraphSAINT Doc (#3898)
* Update graphsaint.py

* Update graphsaint.py
2022-03-31 19:22:21 +08:00
Mufei Li 9fee20b91d [Sampler] [Example] SAINTSampler and Simplify GraphSAINT Example (#3879)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-03-30 13:51:37 +08:00
Peiqi Yin d8375c10ec [BugFix] involve indices_devices for other dataset object. (#3810)
* involve indices_devices for other dataset object.

* modify raise error when device not found.

* remove empty line

* fix line too long
2022-03-30 11:50:03 +08:00
Minjie Wang ae3316c846 [Doc] Update doc of dataloading package. (#3886)
* wip: dataloading doc

* update dataloading package doc and many others

* lint
2022-03-26 21:59:02 +08:00
Quan (Andy) Gan f758db386f [Bug] Fix dtype mismatch in heterogeneous DataLoader (#3878)
* fix

* unit test
2022-03-26 13:56:21 +08:00
Quan (Andy) Gan a0e8cf0d3e [Bugfix] Fix UVA sampling with lazy feature slicing (#3862)
* fix uva sampling with features

* fix

* add is_listlike function to distinguish strings from sequence

* fix

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-03-24 20:13:01 +08:00
Quan (Andy) Gan 44638b9336 fix ddp dataloader in heterogeneous cases (#3801) 2022-03-07 16:56:43 +08:00
Quan (Andy) Gan d41d07d0f6 [Doc and bugfix] Add docs and user guide and update tutorial for sampling pipeline (#3774)
* huuuuge update

* remove

* lint

* lint

* fix

* what happened to nccl

* update multi-gpu unsupervised graphsage example

* replace most of the dgl.mp.process with torch.mp.spawn

* update if condition for use_uva case

* update user guide

* address comments

* incorporating suggestions from @jermainewang

* oops

* fix tutorial to pass CI

* oops

* fix again

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-02-28 02:21:51 +08:00
Mufei Li 6d9433b04f [Transform] [Doc] Rename transform to transforms and update doc (#3765)
* Update

* Update

* Update

* Fix

* Update

* Update

* Update

* Fix
2022-02-24 21:28:15 +08:00
Quan (Andy) Gan 4f00d5ac6f [Bugfix] Fix graph being duplicated in multi-GPU and CPU dataloader workers (#3760)
* fix shared memory issue

* oops

* add explanation

* add explanation
2022-02-22 18:00:47 +08:00
Quan (Andy) Gan 3f138ebaaf [Bugfix] Bug fixes in new dataloader (#3727)
* fixes

* fix

* more fixes

* update

* oops

* lint?

* temporarily revert - will fix in another PR

* more fixes

* skipping mxnet test

* address comments

* fix DDP

* fix edge dataloader exclusion problems

* stupid bug

* fix

* use_uvm option

* fix

* fixes

* fixes

* fixes

* fixes

* add evaluation for cluster gcn and ddp

* stupid bug again

* fixes

* move sanity checks to only support DGLGraphs

* pytorch lightning compatibility fixes

* remove

* poke

* more fixes

* fix

* fix

* disable test

* docstrings

* why is it getting a memory leak?

* fix

* update

* updates and temporarily disable forkingpickler

* update

* fix?

* fix?

* oops

* oops

* fix

* lint

* huh

* uh

* update

* fix

* made it memory efficient

* refine exclude interface

* fix tutorial

* fix tutorial

* fix graph duplication in CPU dataloader workers

* lint

* lint

* Revert "lint"

This reverts commit 805484dd553695111b5fb37f2125214a6b7276e9.

* Revert "lint"

This reverts commit 0bce411b2b415c2ab770343949404498436dc8b2.

* Revert "fix graph duplication in CPU dataloader workers"

This reverts commit 9e3a8cf34c175d3093c773f6bb023b155f2bd27f.

Co-authored-by: xiny <xiny@nvidia.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2022-02-22 01:30:31 +08:00
Quan (Andy) Gan 701b4fccc2 [Sampling] New sampling pipeline plus asynchronous prefetching (#3665)
* initial update

* more

* more

* multi-gpu example

* cluster gcn, finalize homogeneous

* more explanation

* fix

* bunch of fixes

* fix

* RGAT example and more fixes

* shadow-gnn sampler and some changes in unit test

* fix

* wth

* more fixes

* remove shadow+node/edge dataloader tests for possible ux changes

* lints

* add legacy dataloading import just in case

* fix

* update pylint for f-strings

* fix

* lint

* lint

* lint again

* cherry-picking commit fa9f494

* oops

* fix

* add sample_neighbors in dist_graph

* fix

* lint

* fix

* fix

* fix

* fix tutorial

* fix

* fix

* fix

* fix warning

* remove debug

* add get_foo_storage apis

* lint
2022-01-30 16:13:00 +08:00
Quan (Andy) Gan 90f10b31cb [Feature] Negative sampling (#3599)
* first commit

* a bunch of fixes

* add unique

* lint

* lint

* lint

* address comments

* Update negative_sampler.py

* fix

* description

* address comments and fix

* fix

* replace unique with replace

* test pylint

* Update negative_sampler.py
2022-01-07 18:26:14 +08:00
ZZy979 7273a1661e [Doc] Fix docstring of MultiLayerNeighborSampler (#3579)
Make the default value of parameter replace in docstring consistent with code

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-12-13 17:10:46 +08:00
Quan (Andy) Gan eb08ef3831 [Distributed] Edge-type-specific fanouts for heterogeneous graphs (#3558)
* first commit

* second commit

* spaghetti unit tests

* rewrite test
2021-12-06 13:59:29 +08:00
Rhett Ying e053df7965 [Feature] enable async transfer in NodeDataLoader for homograph (#3407)
* [Feature] enable async transfer in NodeDataLoader for homograph

* fix lint issues

* fix device choose when creating stream

* fix test on cpu only machine

* fix pin_memory config

* support homo only

* avoid creating stream in each step and sync via event

* fix lint

* enable graph copy on non-default stream

* fix lint

* refine arg description

* fix conflicts
2021-11-17 10:06:48 +08:00
Xin Yao 65fdfad67b [Doc] Fix the example code of negative sampler (#3501)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-11-16 17:49:34 +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
Xin Yao b717c8bf0d [BugFix] Fix bugs in GPU sampling and enable unit tests for dataloaders on the GPU (#3474)
* enable unit tests for dataloader on the GPU

* fix compatibility

* copyright

* fix linting

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2021-11-04 10:34:56 -07: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
Quan (Andy) Gan b81bb91465 [Bug] Fix edge exclusion still not working for full neighbor sampling (#3424) 2021-10-15 17:51:56 +08:00
Quan (Andy) Gan 5d4f6bca2a [Fix] Fix edge ID exclusion not working in EdgeDataLoader (#3412) 2021-10-14 14:37:54 +08:00
mszarma bc14829fb3 [Feature] Exclude edges in sample_neighbors (#2971)
* [Feature] Exclude edges in sample_neighbors

Extending sample_neighbors and sample_frontier
API to support exclude_edges parameter.

exclude_edges support tensor and dict data
Feature enable excluding certain edges
during neighborhood sampling
Exclude_edges contains EID's of edges
which will be excluded
during neighbor picking for seed nodes.

Added test case for heterograph and homograph
RFC issue id: 2944

* compatibility

* fix

* fix

Co-authored-by: Quan Gan <coin2028@hotmail.com>
2021-09-22 02:15:56 +08:00
Quan (Andy) Gan 75d793a1bc Update dataloader.py (#3322) 2021-09-06 12:16:03 +08:00
nv-dlasalle f634950825 [Performance][Feature] Implement edge excluding in EdgeDataLoader on GPU (#3226)
* Update filter code

* Add unit tests

* Fixes

* Switch to indices

* Rename functions

* Fix linting

* Fix whitespace

* Add doc

* Fix heterograph

* Change workspace allocation

* Fix linting

* Fix docs in filter.py

* Add todo

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-08-19 12:24:15 -07:00
nv-dlasalle 4d9beb3b7b [Fix] FIx check for num_workers for using ScalarDataBatcher (#3219)
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-08-06 17:56:15 +08:00
Da Zheng cb4a83a233 [Distributed] Enable distributed EdgeDataLoader (#3192)
* make heterogeneous find_edges

* add distributed EdgeDataLoader.

* fix.

* fix a bug.

* fix bugs.

* add tests on distributed heterogeneous graph sampling.

* fix.

Co-authored-by: Zheng <dzzhen@3c22fba32af5.ant.amazon.com>
2021-07-28 15:28:27 +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
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
Quan (Andy) Gan 2e19ba8025 add exclude self option for EdgeDataLoader (#3122)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-07-13 13:30:16 +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
Quan (Andy) Gan 427a5a96e0 [Doc] Update NodeDataLoader and EdgeDataLoader for GPU-based neighbor sampling (#3046)
* update docstrings and tidy code

* add docs

* address comments

* Update __init__.py

* address comments
2021-06-25 10:46:21 +08:00
Mufei Li ff519f98c3 [API] Standardize Subgraph APIs (#2929)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Update

* Fix subgraph tests

* Capture stdout for distributed test

* Capture stdout for distributed test

* Update

* Update

* Update

* Update subgraph.cc

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>
2021-06-21 19:53:37 +08:00
nv-dlasalle 8b64ae59b8 [Performance] Perform to_block on the GPU when the dataloader is created with a GPU device. (#3016)
* add output device for dataloading

* Update dataloader

* Get sampler device from dataloader

* Fix line length

* Update examples

* Fix to_block GPU for empty relation types

* Handle the case where the DistGraph has None for the underlying graph

Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-06-13 18:51:00 +08:00
Quan (Andy) Gan f91a97d067 [Dataloader] Fix compatibility of DistributedSampler for older PyTorch versions (#2997)
* fix compatibility

* fix

* lint
2021-06-09 20:14:26 +08:00
Quan (Andy) Gan a7fe461c1c [Doc] Single-machine Multi-GPU node classification tutorial (#2976)
* multi-GPU node classification tutorial

* Update 2_node_classification.py

* fixes

* elaborate a bit more

* address comments

* address comments
2021-06-08 10:28:02 +08:00
Quan (Andy) Gan 7c7113f660 add use_ddp to dataloaders (#2911) 2021-05-17 15:46:02 +08:00
Quan (Andy) Gan 70695ff8f8 [Model] Training GraphSAGE with PyTorch Lightning (#2878)
* pytorch lightning initial examples

* revert most changes in dataloader to favor #2886.

* address comments
2021-05-11 11:28:13 +08:00
Justus Schock bfef789ea1 [Dataloading] Make loader iters iterator (#2886)
* Make loader items iterator

* Update test_dataloader.py

* Update __init__.py

* Update test_dataloader.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-05-07 10:15:49 +08:00
nv-dlasalle e70138bbe4 [Performance][GPU] Enable GPU uniform edge sampling (#2716)
* Start on uniform GPU sampling

* Save more work

* Get cu file compiling

* Update sampling

* More changes

* Get GPU sampling for uniform probabilities solved

* Fix batch tensor migration

* Fix

* update kernels

* expand blocking

* Undo testing change

* Cut down on sampling overhead

* Fix replacement

* Update unit tests

* Add option to gpu sample in graphsage

* Copy only csc to gpu

* Add ogbn support

* Fix linting

* Remove nvtx from sample

* Improve documentation and error checking

* Expand documentation

* Update assert checking

* delete extra space

* Use standard dataloader when dataset is a dictionary

* ogb -> ogbn

* Fix edge selection determinism

* Fix typos

* Remove nvtx

* Add comment for self.fanout_arrays and assert

* Fix linting

* Migrate to scalarbatcher

* Fix indentation

* Fix batcher

* Fix indexing

* Only use databatcher for GPU

* Convert to DGL NDArray to PyTorch Tensor

* Add optimization for PyTorch's F.tensor() for list of GPU tensors

Co-authored-by: Da Zheng <zhengda1936@gmail.com>
2021-04-14 18:55:09 -07:00
Quan (Andy) Gan 48b9ecd201 Fix discrepancy in dgl.dataloading.EdgeDataLoader (#2819)
* fix discrepancy

* address comments
2021-04-07 16:08:14 +08:00