文件历史

提交图

1563 次代码提交

作者 SHA1 备注 提交日期
Rhett Ying 6a6597a02a [Feature] extend sort_csr/csc_by_tag to edge (#4164)
* [Feature] extend sort_csr/csc_by_tag to edge

* fix test ffailure in tensorflow

* refine sorting by edges

* fix docstring

* remove unnecessary mem

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-01 13:16:11 +08:00
Chang Liu b76d0ed1db [Example][Refactor] Regolden graphsage example for future guide (#4186)
* Regolden graphsage example to guide others

* update golden

* update

* Update example and propagate to original folder

* Update to remove ^M (windows DOS) character

* update

* Merge file changes and update README

* Minor comment update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-30 21:56:13 +08:00
Quan (Andy) Gan 7735473b44 [Doc] fix typo (#4193)
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-30 15:00:43 +08:00
nv-dlasalle d2a22984c1 [bugfix] Implement __setstate__ for Column (fixes #4107) (#4174)
* * Workaround for graph data saving/loading compatibility problem in Column class.  There may be more places in DGL with the same issue, due to using Python serialization, instead of a more cohesive, comprehensive strategy.  This is just a local fix.

* Add checking for non-empty states

* Add unit test

* Handle the case of columns without storage

Co-authored-by: ndickson <ndickson@nvidia.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-30 10:10:44 +08:00
Xin Yao 32f12ee19e [Doc] Unify the minimal versions required for PyTorch/TensorFlow/MXNet (#4180) 2022-06-29 18:37:19 +08:00
Xin Yao 5bef48dfda [Performance] Optimize the use of alternative streams in dataloader (#4177)
* fix using alternative streams

* use a alternative stream for subgraph transferring

* fix StreamContext when stream is None
2022-06-29 16:02:25 +08:00
nv-dlasalle 1dddaad4f0 [bugfix] Allow communicators of size one when NCCL is missing (#3713)
* Update nccl communicator for when NCCL is missing

* Use static_cast

* Add doc string

* Fix whitespace

* Resrtict unit test to GPU runs

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-29 11:48:16 +08:00
Mufei Li a25a14f2fa [Bug Fix] Fix A Bug Related to GroupRevRes (#4181)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-06-28 21:17:20 +08:00
Xin Yao b8f905f18b [Bugfix] Fix that pin_prefetcher is not actually enabled (#4169) 2022-06-27 16:07:22 +08:00
nv-dlasalle 020f02498c [Performance][Optimizer] Enable using UVA and FP16 with SparseAdam Optimizer (#3885)
* Add uva by default to embedding

* More updates

* Update optimizer

* Add new uva functions

* Expose new pinned memory function

* Add unit tests

* Update formatting

* Fix unit test

* Handle auto UVA case when training is on CPU

* Allow per-embedding decisions for whether to use UVA

* Address spares_optim.py comments

* Remove unused templates

* Update unit test

* Use dgl allocate memory for pinning

* allow automatically unpin

* workaround for d2h copy with a different dtype

* fix linting

* update error message

* update copyright

Co-authored-by: Xin Yao <xiny@nvidia.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-06-24 09:20:08 +08:00
Xin Yao 077e002fe5 [Bugfix][Rework] Automatically unpin tensors pinned by DGL (rework #3997) (#4135)
* Explicitly unpin tensoradapter allocated arrays

* Undo unrelated change

* Add unit test

* update unit test

* add pinned_by_dgl flag to NDArray::Container

* use dgl.ndarray for holding the pinning status

* update multi-gpu uva inference

* reinterpret cast NDArray::Container* to DLTensor* in MoveAsDLTensor

* update unpin column and examples

* add unit test for unpin column

Co-authored-by: Dominique LaSalle <dlasalle@nvidia.com>
Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-06-23 13:56:54 +08:00
Rhett Ying ab1b28111d [Dist] etype is not guaranteed to be sorted (#4156) 2022-06-23 09:23:08 +08:00
Mufei Li 4d3c01d671 [Bug Fix] Fix the case when reverse_edge is False for citation graphs (#3840)
* Update citation_graph.py

* Update

* Update

* Update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-06-22 23:52:02 +08:00
Quan (Andy) Gan 71157b05a8 [Bug] Fix problem with ShaDowKHopSampler working with reverse edge type exclusion (#4145)
* fix

* fix

* Update utils.py
2022-06-22 21:37:13 +08:00
maqy 794ec4a440 [BugFix] fix unstable sort when using dataloader with HeteroGraph (#4147)
* fix unstable sort

* add torch version check

* reformat

* split too long comments

* Update dataloader.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-06-22 18:05:42 +08:00
Rhett Ying 69226588a5 [Dist] defer to load node/edge feats (#4143)
* [Dist] defer to load node/edge feats

* fix lint

* Update python/dgl/distributed/partition.py

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

* Update python/dgl/distributed/partition.py

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>

* fix lint

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2022-06-20 19:44:37 +08:00
Rhett Ying b258729b3f [Dist] set socket as default backend for RPC (#4120)
* [Dist] set socket as default backend for RPC

* add tests both for socket and tensorpipe
2022-06-16 13:08:19 +08:00
彭齐荣 9a6f292493 [Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110 (#4111)
* Fix fail to create_shared_mem_array in ddp spawn train #4110

Fix fail to create_shared_mem_array in ddp spawn train #4110

* [Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110

[Bugfix] Fix fail to create_shared_mem_array in ddp spawn train #4110
Replace random.seed() to random_ = random.Random()

* Update pytorch.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-06-14 23:39:36 +08:00
RecLusIve-F defa292bc0 [Dataset] Add Flickr and Yelp dataset (#4099)
* Add Flickr and Yelp dataset

* Update flickr.py

* update

* Update yelp.py

* Update yelp.py

* update

* Update yelp.py

* Update test_data.py

* Update yelp.py

* update

* Update test_data.py

* Update yelp.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-14 16:14:12 +08:00
Huarui HE 92e7733065 [dataset] Add a reorder flag to builtin datasets (#4104)
* add argument reorder=False for citation_graph

* add description of the argument reorder

* add reordered/un_reordered save_path

* add version number postfix

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-12 12:35:30 +08:00
Rhett Ying abcc9cce83 disable multiple groups tests due to random failure in CI (#4101) 2022-06-09 17:40:53 +08:00
Rhett Ying cac3720b48 [Dist] enable time out when fetching msg (#4043)
* [ist] enable time out when fetching msg

* fix lint error

* minor refinements

* improve minor log

* fix dist test

* fix timeout issue in tensorpipe
2022-06-08 20:20:03 +08:00
ndickson-nvidia d92a4e8b64 [Bug] Fixed missing dgl.transforms.functional __all__ entries (#4089) 2022-06-08 09:31:44 +08:00
Sai Kandregula c9c79b4401 typo fix in TUDataset docs (#4056)
Co-authored-by: decoherencer <decoherencer@users.noreply.github.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-03 13:29:32 +08:00
Riju Mukherjee efd909e62e [NN] Enhance EGATConv branch (#4062)
* enhance EGATConv| nfeats as tuples

* egatconv modified for bipartite graphs

* modified docstrings

* added/modified unittests for EGATConv

* Update egatconv.py

* rectified lint errors

Co-authored-by: rijulizer <riju.mukherjee@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-03 11:53:10 +08:00
RecLusIve-F 89655cfda2 [Dataset] Add WikiCS Dataset (#4035)
* Fix bugs & Update dataset

* Update

* Update wikics.py

* Update wikics.py

* Update test_data.py

* Update wikics.py

* Update wikics.py

* Update wikics.py

* update

* Update module.py

* Update dgl.data.rst

* Update wikics.py

* Update wikics.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-06-02 23:03:17 +08:00
Mufei Li d9c25521bc [Data] AsGraphPredDataset (#4073)
* Update

* CI

* Update

* Update

* Fix

* Fix
2022-06-02 16:18:48 +08:00
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
Minjie Wang 3c129ad71f [Bugfix] Cython CAPI holding GIL causes deadlock when Python callback is asynchronous (#4036)
* cython nogil

* move APIs to internal and add unit test

* fix lint

* disable callback array test
2022-05-25 10:02:44 +08:00
Mufei Li 230b886ec5 [Bug fix] Misc Fix for Transforms and NN Modules (#4038)
* Update module.py

* Update utils.py

* Update utils.py

* Update utils.py

* Update module.py

* Update

* Update

* Update
2022-05-24 18:08:08 +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
rudongyu 3fe5eea791 [NN] Label Propagation & Directional Graph Networks (#4017)
* add label propagation module

* fix prev bug in example

* add dgn

* fix linting and doc issues

* update label propagation & dgn

* update label propagation & dgn

* update example

* fix unit test

* fix agg heritage issue

* fix agg issue

* fix lint

* fix idx

* fix lp gpu issue

* Update

* Update

Co-authored-by: mufeili <mufeili1996@gmail.com>
2022-05-20 15:23:19 +08:00
Rhett Ying 53835bdb75 [Dist][BugFix] enable sampling on bipartite (#4014)
* [Dist][BugFix] enable sampling on bipartite

* add comments for tests
2022-05-18 10:14:54 +08:00
Mufei Li de5543e3db Update functional.py (#4015) 2022-05-17 14:14:04 +08:00
ndickson-nvidia e0e8736fa0 [Feature] Added floating-point conversion functions to dgl.transforms.functional (#3890)
* * Added half_(), float_(), and double_() functions to DGLHeteroGraph, HeteroNodeDataView, and HeteroEdgeDataView, for converting floating-point tensor data to float16, float32, or float64 precision

* * Extracted out private functions for floating-point type conversion, to reduce code duplication

* * Added test for floating-point data conversion functions, half_(), float_(), and double_()

* * Moved half_(), float_(), and double_() functions from HeteroNodeDataView and HeteroEdgeDataView to Frame class

* * Updated test_float_cast() to use dgl.heterograph instead of dgl.graph

* Added to CONTRIBUTORS.md

* * Changed data type conversion to be deferred until the data is accessed, to avoid redundant conversions of data that isn't used.

* * Addressed issues flagged by linter

* * Worked around a bug in the old version of mxnet that's currently used for DGL testing

* * Only defer Column data type conversion if there is a pending device transfer or index sampling to be done.  This is expected to be the desired behaviour based on discussions of a few use cases, as described in the comments.

* * Moved floating-point feature data conversion functions to dgl.transforms.functional
* Changed them from in-place behaviour to shallow copy (out-of-place) behaviour

* * Fixed linter issues

* * Removed lines that unintentionally added to_half, to_float, and to_double to DGLHeteroGraph
* Moved _init_api line to the end of the file again

* * Removed one of the two leading underscores from Frame.__astype_float, making it not fully private

Co-authored-by: nv-dlasalle <63612878+nv-dlasalle@users.noreply.github.com>
2022-05-16 18:17:15 -07:00
nv-dlasalle 1f2e696080 Prevent users from attempting to pin PyTorch non-contiguous tensors or views only encompassing part of tensor. (#3992)
* Disable pinning non-contiguous memory

* Prevent views from being converted for write

* Fix linting

* Add unit tests

* Improve error message for users

* Switch to pytest function

* exclude mxnet and tensorflow from inplace pinning

* Add skip

* Restrict to pytorch backend

* Use backend to retrieve device

* Fix capitalization in decorator

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-05-16 14:49:36 -07:00
Mufei Li 65b0b9e8c3 [Dataset & Transform] Synthetic Datasets for Explainability and SIGNDiffusion Transform (#3982)
* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Update

* Update

* Update
2022-05-16 22:32:09 +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
Rhett Ying 22e218d335 [Dist] Enable maximum try times for socket backend via DGL_DIST_MAX_T… (#3977)
* [Dist] Enable maximum try times for socket backend via DGL_DIST_MAX_TRY_TIMES

* reset env before/after test

* print log for info when trying to connect

* fix

* print log in python instead of cpp
2022-05-11 13:03:06 +08:00
ndickson-nvidia edf2d52666 [Dist][Optim] Fixed race conditions in distributed SparseAdam and SparseAdagrad (#3971)
* * Fixed race condition bug in distributed/optim/pytorch/sparse_optim.py's SparseAdam::update, corresponding with the bug fixed in the non-distributed version in https://github.com/dmlc/dgl/pull/3013 , though using the newer Event-based approach from that corresponding function.  The race condition would often result in NaNs, like the previously fixed bug. https://github.com/dmlc/dgl/issues/2760

* * Fixed race condition bug in SparseAdagrad::update corresponding with the one fixed in SparseAdam::update in the previous commit.  Same info applies.

* * Fixed typo in all copies of a repeatedly-copied comment near bug fixed 3 commits ago, checking all implementations nearby for a corresponding bug.  (All of them appear to have been fixed as of 2 commits ago.)

* * Removed trailing whitespace

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
2022-05-09 09:05:31 -07:00
Quan (Andy) Gan 34981bd676 [Doc] Fix compact_graphs example docstring (#3953)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-05-08 15:58:00 +08:00
RecLusIve-F b2ec5a2ea6 [Transform] Add FeatMask and RowFeatNormalizer transforms (#3968)
* [Model]P-GNN

* updata

* [Example]P-GNN

* Update README.md

* Add NodeFeatureMasking and NormalizeFeatures

* Update

* Update transforms.rst

* Update

* Update

* Update

* Update test_transform.py

* Update

* Update

* Update test_transform.py

* Update module.py

* Update module.py

* Update module.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-05-07 11:59:39 +08:00
Krzysztof Sadowski 5b97a1a26e add bias argument (#3970) 2022-05-05 10:17:24 +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
Rhett Ying 37be02a486 [Feature] enable socket net_type for rpc (#3951)
* [Feature] enable socket net_type for rpc

* fix lint

* fix lint

* fix build issue on windows

* fix test failure on windows

* fix test failure

* fix cpp unit test failure

* net_type blocking max_try_times

* fix other comments

* fix lint

* fix comment

* fix lint

* fix cpp
2022-04-28 00:10:06 +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
Mufei Li 248bece633 [NN] GINEConv (#3934)
* Update

* Update

* Update

* Update

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-04-25 14:41:05 +08:00
Quan (Andy) Gan 4375c2d7e4 [Doc] Fix documentation in dgl.multiprocessing namespace (#3929)
* fix docs

* remove

* oh

* fix
2022-04-16 00:35:06 +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