文件历史

提交图

212 次代码提交

作者 SHA1 备注 提交日期
Xin Yao ae4a5b7394 [Feature] Add state_dict, load_state_dict, param_groups to dgl.optim.SparseGradOptimizer (#5311)
* init update

* all get/set optm_state

* add unit tests

* add docstring

* fix for multiple embeddings

* move embedding methods to private

* fix lint

* fix unit tests

* resolve comments

* merge master
2023-03-08 16:46:34 +08:00
Hongzhi (Steve), Chen a454734f16 [Misc] Follow up on the missing comment in PR#4989. (#5437)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
Co-authored-by: Xin Yao <yaox12@outlook.com>
2023-03-08 13:32:21 +08:00
Xin Yao 8d5d8962ad [Refactor] Replace third_party/nccl with PyTorch's NCCL backend (#4989)
* expose GeneratePermutation

* add sparse_all_to_all_push

* add sparse_all_to_all_pull

* add unit test

* handle world_size=1

* remove python nccl wrapper

* remove the nccl dependency

* use pinned memory to speedup D2H copy

* fix lint

* resolve comments

* fix lint

* fix ut

* resolve comments
2023-03-08 12:59:10 +08:00
Tingyu Wang bfd411d0d5 [Model] Add dgl.nn.CuGraphGATConv model (#5168)
* add CuGraphGATConv model

* lintrunner

* update model to reflect changes in make_mfg_csr(), move max_in_degree to forward()

* simplify pytest markers

* fall back to FG option for large fanout

* update error msg

* add feat_drop and activation options

* add residual option

* Update python/dgl/nn/pytorch/conv/cugraph_gatconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/conv/cugraph_gatconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* reset res_fc

---------

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2023-03-04 14:10:06 +08:00
Kunal Mukherjee 45153fc078 [Model] Implemented SubgraphX Explainer for Homogeneous graph (#5315)
* subgraphx commit

* nits

* newline eof added

* lint fix

* test script updated to use default values

* lint fix

* graphs that are used for test cases are updated to a small graph

* lint formatted

* test paramter adj to complete the test under 20s

* lint fixes

---------

Co-authored-by: kxm180046 <kxm180046@utdallas.edu>
2023-02-23 12:50:31 +08:00
Tingyu Wang bcf9923b32 [Model] Add dgl.nn.CuGraphSAGEConv model (#5137)
* add CuGraphSAGEConv model

* fix lint issues

* update model to reflect changes in make_mfg_csr(), move max_in_degree to forward()

* lintrunner

* allow reset_parameters()

* remove norm option, simplify test

* allow full graph fallback option, add example

* address comments

* address reviews

---------

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2023-02-22 13:43:28 +08:00
Hongzhi (Steve), Chen 63ac788ff4 auto-reformat-nn (#5319)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
2023-02-19 08:33:30 +08:00
Tingyu Wang 19b3cea166 [Model] Update CuGraphRelGraphConv to use pylibcugraphops=23.02 (#5217)
* update cugraph_relgraphconv

* update equality test

* update cugraph rgcn example

* update RelGraphConvAgg based on latest API changes

* enable fallback option to fg when fanout is large

---------

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2023-02-15 20:11:20 +08:00
Zahi Kakish 21733e903b Documentation equation syntax fix for EGATConv (#5284)
Some weird formatting occurred in the documentation for EGATConv, so this quick commit should fix that.

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2023-02-13 14:58:11 +08:00
Rhett Ying b7042a141c [BugFix] fix unexpected exception when agg_type is GCN and bias disabled (#5127)
* [BugFix] fix unexpected exception when agg_type is GCN and bias is disabled

* Update sageconv.py

Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2023-01-10 09:05:44 +08:00
bgawrych e296c468b2 [Optimization] Optimize bias term in SageConv layer (#4747)
* Optimize bias term in sageconv

* fix lint

* Remove bias sharing

* Update sageconv.py

Co-authored-by: Bartlomiej Gawrych <barlomiej.gawrych@intel.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2023-01-08 13:06:46 +08:00
peizhou001 ab0c0ec68f [API Deprecation] Deprecate candidates in convert module (#4988) (#5115) 2023-01-06 14:45:52 +08:00
Xin Yao dde5cf5d02 [Bug] Fix NN modules crashing with non-FP32 inputs (reopen #4262) (#4829)
* fix fp16 in nn modules

* fix lint

* remove the example

Co-authored-by: Quan Gan <coin2028@hotmail.com>
2023-01-06 14:18:19 +08:00
ZhenyuLU_Heliodore cd817a1a00 [NN] Add SpatialEncoder and SpatialEncoder3d (#4991)
* Add SpatialEncoder and SpatialEncoder3d

* Optimize the code execution efficiency

* Fixed certain problems according to Dongyu's suggestions.

* Fix an error about probability of division by zero in PathEcoder; Change certain designs in SpatialEncoder

* Fix a typo

* polish the docstring

* fix doc

* lint

Co-authored-by: Ubuntu <ubuntu@ip-172-31-14-146.ap-northeast-1.compute.internal>
Co-authored-by: rudongyu <ru_dongyu@outlook.com>
2023-01-03 14:02:14 +08:00
Xin Yao 3db6604e67 [Fix core lib warning] Fix using torch.tensor for tensor conversion (#5028) 2022-12-15 13:50:33 +08:00
peizhou001 996c533149 [Model] Fix bug of gatv2 when input is block (#5000)
Co-authored-by: Ubuntu <ubuntu@ip-172-31-16-19.ap-northeast-1.compute.internal>
2022-12-12 15:32:48 +08:00
Zhiteng Li 279e2e8fba Add Graph Transformer Layer (Dense Computation) (#4959)
* Add GraphTransformerLayer (dense)

* beautify the python code with black

* refine according to mufei's comments

* fix AttributeError in unit test

* rename module as GraphormerLayer

* fix name issue

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-07 16:23:14 +08:00
Tingyu Wang ba21295cd5 [Model] Update CuGraphRelGraphConv to use new bindings from pylibcugraphops (#4965)
* update agg function with new bindings

* handle optional import in __init__

* raise error in RelGraphConvAgg when pylibcugraphops not imported

* Update tests/cugraph/cugraph-ops/test_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update tests/cugraph/cugraph-ops/test_cugraph_relgraphconv.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* use keyword args for readability

* add missing docstring to pass CI

* catch ImportError rather than ModuleNotFoundError

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-06 14:00:57 +08:00
ZhenyuLU_Heliodore 93ecfa313a [NN] Add PathEncoder (#4956)
* Add PathEncoder to transformer.py

* add blank line at the and

* rename variabl sp to shortest_path

* Fixed corresponding problems

* Fixed certain bugs when running on CUDA

* changed clamp min from 0 to 1

Co-authored-by: Ubuntu <ubuntu@ip-172-31-14-146.ap-northeast-1.compute.internal>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-12-05 13:47:51 +08:00
peizhou001 611393021a [API Deprecation] Remove candidates in DGLGraph (#4946) 2022-12-01 16:41:53 +08:00
Zhiteng Li 16eba6e88c [NN] Add biased multi-head attention module (dense) (#4916)
* Add biased multi-head attention module (dense)

* fix lint issues

* refine according to dongyu's comments

Co-authored-by: rudongyu <ru_dongyu@outlook.com>
2022-11-20 14:55:25 +08:00
Tingyu Wang 4ecd2c8585 [Model] Add dgl.nn.CuGraphRelGraphConv model (#4826)
* added relgraphconv

* add tests for CuGraphRelGraphConv

* move test to tests directory

* update docs

* address PR review 1

* address PR review, continued

* remove stashing ctx.device

* make fanout optional

* fanout -> max_in_degree

* improve docstrings consistency

* initialize parameters directly in __init__

* get rid of shared memory size check

* improve docs

* format comments

* skip test case for regularizer=None

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
2022-11-18 14:04:51 +08:00
peizhou001 3132da2826 Deprecate (#4864)
rename DGLHeteroGraph to DGLGraph
2022-11-15 10:01:01 +08:00
dddg617 ee9887d66a [Fix]Support HGT mini-batch (#4664)
* [Fix]Support HGT mini-batch

* [Test] Update HGT test

* [Conv] nightly update conv

* [Conv] nightly update
2022-11-14 16:18:39 +08:00
ZhenyuLU_Heliodore 9d9280cb0e [NN] Add DegreeEncoder for graph transformer (#4742)
* Add files via upload

This file will contain several utility modules for Graph Transformer. DegreeEncoder has been implemented in this file now.

* Update graph_transformer.py

* Update nn-pytorch.rst

Add graph_transformer.DegreeEncoder in Utility Modules

* Update test_nn.py

* Update __init__.py

* Update graph_transformer.py

* Update test_nn.py

* Update graph_transformer.py

fix unused import

* Update graph_transformer.py

add module doc-string

* Update graph_transformer.py

* Update graph_transformer.py

Co-authored-by: rudongyu <ru_dongyu@outlook.com>
2022-11-02 13:29:41 +08:00
Zhiteng Li ed66a20970 [NN] Add a learned laplacian positional encoder (#4750)
* add a learned laplacian positional encoder

* leverage black to beautify the python code

* refine according to dongyu's comments

Co-authored-by: rudongyu <ru_dongyu@outlook.com>
2022-10-31 11:11:37 +08:00
Infinity_X 4b1fb6816a [Model] Heterogeneous graph support for GNNExplainer (#4401)
* [Model] Heterogeneous graph support for GNNExplainer (#1)

* add HeteroGNNExplainer

* GNNExplainer for heterogeenous graph

* fix typo

* variable name cleanup

* added HeteroGNNExplainer test

* added doc indexing for HeteroGNNExplainer

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update python/dgl/nn/pytorch/explain/gnnexplainer.py

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

* Update gnnexplainer.py

Change DGLHeteroGraph to DGLGraph, and specified parameter inputs

* Added ntype parameter to the explainer_node call

* responding to @mufeili's comment regarding restoring empty lines at appriopiate places to be consistent with existing practices

* responding to @mufeili's comment regarding restoring empty lines at appriopiate places that were missed in the last commit

* docstring comments added based on @mufeili suggestions

* indorporated @mufeili requested changes related to docstring model declaration.

* example model and test_nn.py added for explain_graphs

* explain_nodes fixed and fixed the way hetero num nodes and edges are handled

* white spaces removed

* lint issues fixed

* explain_graph model updated

* explain nodes model updated

* minor fixes related to gpu compatability

* cuda support added

* simplify WIP

* _init_masks for ennexplainer updated to match heterographs

* Update

* model simplified and docstring comments updated

* nits: docstring udpated

* lint check issues updated

* lint check updated

* soem formatting updated

* disabling int32 testing for GNNExplainer

* Update

Co-authored-by: Kangkook Jee <kangkook.jee@gmail.com>
Co-authored-by: ahadjawaid <94938815+ahadjawaid@users.noreply.github.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: kxm180046 <kxm180046@utdallas.edu>
Co-authored-by: Kunal Mukherjee <kunmukh@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-10-27 21:01:36 +08:00
LuckyLiuM f846d902cf Add Metapath2vec module (#4660)
* metapath2vec package

* fix bugs --metapath2vec package

* add unittest and fix bugs

* fix pyling messages

* del init.py

* fix bugs

* modify metapath2vec and add deepwalk

* metapath2vec module

* Update

* Update

* rollback to initial metapath2vec

* Update

* Update

* Update

* Update

Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
2022-10-13 01:01:07 +08:00
Hongzhi (Steve), Chen 76bb54044e [Misc] Black auto fix. (#4682)
Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2022-10-08 14:16:12 +08:00
LuckyLiuM eb729c5401 Add Deepwalk module (#4562)
* metapath2vec package

* fix bugs --metapath2vec package

* add unittest and fix bugs

* fix pyling messages

* del init.py

* fix bugs

* modify metapath2vec and add deepwalk

* deepwalk module

* del metapath2vec files

* Update

* Update

* Update

* Update

* Update

* Fix

Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-09-29 09:30:56 +08:00
YanJun-Zhao ec4271bf87 [Example] Refactor GNNExplainer Example (#4560)
* debug

* debug

* readme

* fix readme

* fix readme

* Update

* Update

* update

* fix bug of syn2

Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-09-21 13:34:39 +08:00
Quan (Andy) Gan 8366774122 [Feature] Support canonical edge types in HeteroGraphConv (#4440)
* fix

* Update hetero.py

* why did i remove this

Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-09-20 14:15:26 +08:00
ndickson-nvidia 684f66b7aa [Feature] Added exclude_self and output_batch to knn graph construction (Issues #4323 #4316) (#4389)
* * Added "exclude_self" and "output_batch" options to knn_graph and segmented_knn_graph
* Updated out-of-date comments on remove_edges and remove_self_loop, since they now preserve batch information

* * Changed defaults on new knn_graph and segmented_knn_graph function parameters, for compatibility; pytorch/test_geometry.py was failing

* * Added test to ensure dgl.remove_self_loop function correctly updates batch information

* * Added new knn_graph and segmented_knn_graph parameters to dgl.nn.KNNGraph and dgl.nn.SegmentedKNNGraph

* * Formatting

* * Oops, I missed the one in segmented_knn_graph when I fixed the similar thing in knn_graph

* * Fixed edge case handling when invalid k specified, since it still needs to be handled consistently for tests to pass
* Fixed context of batch info, since it must match the context of the input position data for remove_self_loop to succeed

* * Fixed batch info resulting from knn_graph when output_batch is true, for case of 3D input tensor, representing multiple segments

* * Added testing of new exclude_self and output_batch parameters on knn_graph and segmented_knn_graph, and their wrappers, KNNGraph and SegmentedKNNGraph, into the test_knn_cuda test

* * Added doc comments for new parameters

* * Added correct handling for uncommon case of k or more coincident points when excluding self edges in knn_graph and segmented_knn_graph
* Added test cases for more than k coincident points

* * Updated doc comments for output_batch parameters for clarity

* * Linter formatting fixes

* * Extracted out common function for test_knn_cpu and test_knn_cuda, to add the new test cases to test_knn_cpu

* * Rewording in doc comments

* * Removed output_batch parameter from knn_graph and segmented_knn_graph, in favour of always setting the batch information, except in knn_graph if x is a 2D tensor

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-09-07 08:35:26 +08:00
YJ-Zhao a88e7f7e28 [Example]rgcn-ogbn-mag (#4331)
* rgcn-ogbn-mag

* Add link in README.md

* correct code-format,add the reset_parameters function to the HeteroEmbedding module

* add the annotation in hetero.py

* add a unit test

* modify format

* Update

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-50-143.us-west-2.compute.internal>
2022-08-10 20:12:31 +08:00
Chang Liu 5ba5106aca [Bugfix] Fix the default value of num_bases in RelGraphConv module (#4321)
* Fix doc and default settings for RelGraphConv

* Add unit test

* Split msg in two lines to pass CI-lint
2022-08-07 16:33:16 +08:00
Rhett Ying d6957c28ff [BugFix] fix incorrect _bias and bias usage (#4310) 2022-07-30 17:40:54 +08:00
Mufei Li fdbf5a0fda [DGL-Go][Doc] Update DGL-Go version to 0.0.2 and misc fix from bug bash (#4236)
* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-142.us-west-2.compute.internal>
Co-authored-by: Xin Yao <xiny@nvidia.com>
2022-07-14 21:30:38 +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
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
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
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
Krzysztof Sadowski 5b97a1a26e add bias argument (#3970) 2022-05-05 10:17:24 +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
Mufei Li 43b9d40e5e [Doc] Fix Doc for EGNNConv (#3919)
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2022-04-11 11:01:15 +08:00
rudongyu dc5035b1f3 [NN] Add EGNN & PNA (#3901)
* add EGNN & PNA

* fix egnn issues

* fix pna issues

* update pna conv

* add doc strings

* update pnaconv

* fix unused args issue

* fix moment aggregation issue

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-04-07 17:44:57 +08:00
Krzysztof Sadowski 4c7bd314b4 [Feature] Radius Graph (#3829)
* radius graph

* remove trailing whitespaces from docs

* disable invalid name for transform func

* disable radius graph module invalid name

* move pylint disable before init

* fix missing nodes from point set

* update docs indexing

* add compute mode as optional param

* radius graph test

* remove trailing whitespaces

* fix precision when comparing tensors

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-03-30 17:23:29 +08:00
Sai Kandregula 12e97c54ac [Feature] get_attention parameter in GlobalAttentionPooling (#3837)
* get_attention parameter in GlobalAttentionPooling

* removed trailing whitespace

* lint fix

Co-authored-by: decoherencer <decoherencer@users.noreply.github.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
2022-03-24 12:49:40 +08:00
Mufei Li 61edb7980a [NN] Update GNNExplainer (#3848)
* Update

* Update

* Update
2022-03-23 18:40:49 +08:00
Mufei Li 8005978e1e [NN] Grouped reversible residual connections for GNNs (#3842)
* Update

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* Update

* Update
2022-03-23 16:58:39 +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