文件历史

50 次代码提交

作者 SHA1 备注 提交日期
Quan (Andy) Gan bf11b19e76 Update dataloader.py (#3322) 2021-11-04 08:14:21 +00:00
Da Zheng f0903275e8 [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-11-02 09:22:10 +00:00
xiang song(charlie.song) 508197e807 [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-11-02 09:21:20 +00:00
Da Zheng 223795eb82 [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-11-02 09:18:15 +00:00
nv-dlasalle d9a2d74167 [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-20 02:47:48 +00:00
nv-dlasalle 55dfef0e81 [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-20 02:36:53 +00: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
Hengrui Zhang 1789972c4b [Bugfix] add default value for BlockSampler (#2771)
* [Bugfix] add default value for BlockSampler

* [Doc] modify user_guide description about MultiLayerDropoutSample

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-03-22 14:02:27 +08:00
Quan (Andy) Gan 99751d4960 [Doc] Rename block to message flow graph (#2702)
* rename block to mfg

* revert

* rename
2021-02-25 18:26:19 +08:00
Quan (Andy) Gan d93a975997 revert (#2672) 2021-02-19 12:05:42 +08:00
Quan (Andy) Gan 98ac391ed9 [Doc] Large graph training tutorials (#2595)
* large graph training tutorials

* add full graph link prediction update

* fix

* fix

* fix

* addressed comments
2021-02-07 17:55:49 +08:00
nv-dlasalle a6abffe303 [Fix] Don't create extra formats in dataloader (#2551)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-01-24 20:59:24 +08:00
Mufei Li 5da3439c16 [Feature] Add Device Flag in Data Loaders (#2450)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-01-15 07:39:26 +08:00
Tong He a9f8f2589c [Doc] Update GraphDataLoader in our docs (#2504)
* update graphdataloader in docs

* fix

* update examples

* fix sagpool

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-01-11 13:11:19 +08:00
Quan (Andy) Gan bdb88df576 [Performance] Allow DataLoaders to return indices of the seed array (#2495)
* return indices from dataloader

* fixes

* fix

* fix distgraph and added some todos

* Update dataloader.py

* Update dataloader.py

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2021-01-08 14:30:52 +08:00
Tong He e2e524df41 [Feature] Add GraphDataLoader implementation (#2496)
* add graph dataloader

* add to doc

* fix

* fix

* fix docstring

* update according to torch default_collate

* add unittest

* fix

* fix lint

* fix
2021-01-07 13:38:21 +08:00
Mufei Li 0c2a2ea1e2 [Bugfix] Handle a Corner Case of Batching after Removing Nodes/Edges (#2465)
* Update

* Update

* Update

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2021-01-05 22:22:03 +08:00
Tim Gates 9fabc9b8c5 [Doc] fix simple typo, tranfer -> transfer (#2464)
There is a small typo in python/dgl/dataloading/async_transferer.py.

Should read `transfer` rather than `tranfer`.

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2021-01-02 19:26:09 +08:00
Quan (Andy) Gan 38077e298b installation and doc fix (#2379) 2020-11-30 19:47:40 +08:00
nv-dlasalle 6eda605ccd [BugFix][Dataloading] Disable AsyncTransferer copying to anywhere but the GPU (#2323)
* Disable copying for anywhere but the GPU

* Remove unused import and remove references to transferring from the GPU from the docs

* Skip gpu test in cpu mode

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-11-07 21:34:54 +08:00
nv-dlasalle d453d72dd1 [Doc][Dataloading] Expand documentation of AsyncTransferer (#2313)
* Update docs

* Make non-default streams non-blocking
2020-11-02 12:28:30 -08:00
nv-dlasalle f673fc2553 [Dataloading] Add class for copying tensors to/from the GPU on a non-default stream (#2284)
* Add async transferer class

* Add async ndarray copy interface

* Add python bindings

* Fix comment

* Add python class

* Fix linting issues

* Add python unit test

* Update python interface

* move async_transferer to cuda only directory

* Fix linting issue

* Move out of contrib

* Add doc strings

* Move test compute from backend

* Update comment

* Fix test naming

* Fix argument usage

* Wrap/unwrap backend parameters

* Move to dataloading

* Move to 'dataloading'

* Make GPU/CPU compatible

* Fix unit tests

* Add docs

* Use only backend interface for datamovement in unit test
2020-10-30 07:29:06 -07:00
Quan (Andy) Gan 49e96970e2 [Doc] fix typos in PyTorch DataLoaders (#2216)
* fix doc

* fix doc
2020-09-20 13:21:05 +08:00
Mufei Li f3f646bbfd [Doc and User Guide] Minor Fix (#2205)
* Fix doc and user guide

* Update heterograph.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-13-9.us-west-2.compute.internal>
2020-09-17 03:01:12 +08:00
Quan (Andy) Gan 76d66fd35d [Bug] Fix dtype mismatch in EdgeDataLoader on Windows (#2188)
* fix node and edge dataloader on windows

* fix distributed
2020-09-13 18:25:05 +08:00
Quan (Andy) Gan 4dae26a1fc [Doc] Fix typo in dataloading.negative_sampler (#2177)
* fix dataloading docs

* fix another
2020-09-11 19:39:48 +08:00
Quan (Andy) Gan b10b541c11 fix multiple docstring inconsistencies (#2167) 2020-09-10 11:03:34 +08:00
Quan (Andy) Gan ac5c79cdb8 [Bug] Fixes issues in feature pickling and transmission for subgraphs and blocks (#2139)
* bug fixes

* remove __deepcopy__; not sure what the behavior should be

* lint

* skip gpu test

* fix

* fix dist dataloader

* add comment

* remove assert
2020-09-03 12:48:59 +08:00
Quan (Andy) Gan 9eaace9216 rename create_format_ to create_formats_ (#2126) 2020-08-29 22:49:27 +08:00
Minjie Wang f13b9b6212 [Doc] Scan the API docs and make many changes (#2080)
* WIP: api

* dgl.sampling, dgl.data

* dgl.sampling; dgl.dataloading

* sampling packages

* convert

* subgraph

* deprecate

* subgraph APIs

* All docstrings for convert/subgraph/transform

* almost all funcs under dgl namespace

* WIP: DGLGraph

* done graph query

* message passing functions

* lint

* fix merge error

* fix test

* lint

* fix

Co-authored-by: Quan Gan <coin2028@hotmail.com>
2020-08-20 23:26:49 +08:00
Quan (Andy) Gan ef976be1e9 [Bug][Doc] Fix NodeDataLoader docstrings and code (#2063) 2020-08-19 21:59:02 +08:00
Mufei Li be444e52d9 [Doc/Feature] Refactor, doc update and behavior fix for graphs (#1983)
* Update graph

* Fix for dgl.graph

* from_scipy

* Replace canonical_etypes with relations

* from_networkx

* Update for hetero_from_relations

* Roll back the change of canonical_etypes to relations

* heterograph

* bipartite

* Update doc

* Fix lint

* Fix lint

* Fix test cases

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update

* Fix test

* Fix

* Update

* Use DGLError

* Update

* Update

* Update

* Update

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* rewrite sanity checks

* delete unnecessary checks

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Update

* Update

* Update

* Fix

* Fix

* Fix

* Update

* Fix

* Update

* Fix

* Fix

* Update

* Fix

* Update

* Fix

Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Quan Gan <coin2028@hotmail.com>
2020-08-18 04:26:29 +08:00
Quan (Andy) Gan 4f1da61b58 [Doc] fix inconsistencies in minibatch user guide (#2032) 2020-08-17 12:43:43 +08:00
Quan (Andy) Gan 1f7b219594 [Doc] User guide section 5 and 6 (#2029)
* [Doc] User guide section 5 and 6

* oops

* fix
2020-08-17 09:47:01 +08:00
Da Zheng efa95d8673 [Distributed] Fix bugs (#2009)
* fix.

* add tests.

* fix.

* fix.
2020-08-13 23:51:11 -07:00
Da Zheng 1ad46fd015 [Distributed] support distributed sampling in NodeDataLoader (#2012)
* fix.

* doesn't support EdgeDataLoader

* add test.

* fix.

* fix test.

* catch errors in the test.

* fix.

* fix error message

* add print.

* join the server processes.

* update test.

* fix test.
2020-08-13 22:49:21 -07:00
Quan (Andy) Gan cd48435206 [Transform] Docstring and subframes (#1962)
* update knn graph docs

* more docs

* [Doc] transform module docstrings

* remove copy_ndata and copy_edata

* fix

* lint

* fix

* fix

* fix

* clean up docstrings

* fix docstring

* dtype specifications

* addresses comments

* fix

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
2020-08-13 10:41:43 +08:00
Da Zheng d1cf5c383e [Distributed] adjust various APIs. (#1993)
* rename get_data_size.

* remove g from DistTensor.

* remove g from DistEmbedding.

* clean up API of graph partition book.

* fix DistGraph

* fix lint.

* collect all part policies.

* fix.

* fix.

* support distributed sampler.

* remove partition.py
2020-08-11 20:22:00 -07:00
Quan (Andy) Gan f5eb80d221 [Feature] Edge DataLoader for edge classification & link prediction (#1828)
* clean commit

* oops forgot the most important files

* use einsum

* copy feature from frontier to block

* Revert "copy feature from frontier to block"

This reverts commit 5224ec963eb6a3ef1b6ab74d8ecbd44e4e42f285.

* temp fix

* unit test

* fix

* revert jtnn

* lint

* fix win64

* docstring fixes and doc indexing

* revert einsum in sparse bidecoder

* fix some examples

* lint

* fix due to some tediousness in remove_edges

* addresses comments

* fix

* more jtnn fixes

* fix
2020-08-11 18:00:58 +08:00