文件历史

241 次代码提交

作者 SHA1 备注 提交日期
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
Minjie Wang 0227ddfb66 [NN] Rework RelGraphConv and HGTConv (#3742)
* WIP: TypedLinear and new RelGraphConv

* wip

* further simplify RGCN

* a bunch of tweak for performance; add basic cpu support

* update on segmm

* wip: segment.cu

* new backward kernel works

* fix a bunch of bugs in kernel; leave idx_a for future

* add nn test for typed_linear

* rgcn nn test

* bugfix in corner case; update RGCN README

* doc

* fix cpp lint

* fix lint

* fix ut

* wip: hgtconv; presorted flag for rgcn

* hgt code and ut; WIP: some fix on reorder graph

* better typed linear init

* fix ut

* fix lint; add docstring
2022-02-23 12:10:20 +08:00
Rhett Ying 80fb4dbe26 [Doc] fix examples (#3747) 2022-02-17 18:46:13 +08:00
dddg617 9e358dfe66 [NN] HeteroLinear and HeteroEmbedding (#3678)
* modify hetero

* modify rst document

* update hetero

* update hetero

* update hetero

* update hetero

* Update

* Update

* Update

* Update

* 20220216

* Update

* Update

* Fix

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
Co-authored-by: ShelkerX <925089962@qq.com>
2022-02-17 16:16:51 +08:00
Rhett Ying 22272de652 [Fix] normalize by dst if edge_weight is None (#3744)
* [Fix] normalize by dst if edge_weight is None

* [Doc] fix math formula display issue
2022-02-17 13:51:37 +08:00
Rhett Ying 42f8c8f335 [doc] fix module typo (#3734)
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-02-16 11:10:06 +08:00
Rhett Ying 97a6d740ad [doc] fix error in example results (#3735)
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-02-16 09:40:45 +08:00
Rhett Ying 4f7ad2582c [doc] fix error in example (#3736) 2022-02-15 18:44:15 +08:00
KoyamaSohei fa343873a8 Fix docs on GraphSAGE normalization (#3711)
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2022-02-07 17:56:04 +08:00
Jeremy Goh 25c9221b83 Add check for aggregator_type enum in SAGEConv init (#3691)
Co-authored-by: Quan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2022-02-03 12:02:35 +08:00
Mufei Li 05c6c3c5ec [NN] Fix GINConv (#3692)
* Update

* Update

* Fix

* Update

* Update

* Update

* Update

* Fix

* Update

* Update

* Update

* Update

* Fix lint

* lint

* Update

* Update

* lint fix

* Fix CI

* Fix

* Fix CI

* Update

* Fix

* Update

* Update

* Update ginconv.py

* Update test_nn.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-31-136.us-west-2.compute.internal>
2022-01-27 12:46:29 +08:00
Jeremy Goh 8f5baa15e4 [Doc] Fix spelling, references and update info on building docs (#3682)
* Fix ref to message-passing guide

* Fix pygments and spacing

* Update build documentation steps in README.md

* Use links

* Adjust parameters in SAGEConv docstring in same order as init

* Fix spelling error

* Change doc link
2022-01-25 17:22:18 +08:00
RONANKI SWAMY SRIHARSHA 9c1065479e [NN] Added activation function as an optional parameter to GINConv (#3565)
* Added activation function as an optional parameter

* lint fixes

* Modified the input parameters in tandem with other classes

* lint corrections

* corrected tests

* Reverting back to the old interface

* lint corrections

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2021-12-29 14:01:01 +08:00
schmidt-ju 5f4c879399 Fix output dimensions of residual connection for GATv2Conv (#3584)
Number of heads needs to be considered for the transformation of the destination features. Otherwise this will crash if residual==True.
2021-12-13 12:41:30 +08:00
Mufei Li d6eecf90a1 [NN] TransE and TransR (#3530)
* Update

* Update

* Update

* Update

* Update

* CI

* CI

* CI

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-12-07 10:13:13 +08:00
Yongyi c3103b62bf [BugFix] Fix a bug in TWIRLS, add unittest (#3573)
* Fix a bug in TWIRLS, add unittest

* reformatting the code

* modify unittest for TWIRLS

Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2021-12-07 00:23:09 +08:00
Mufei Li d2ef24335c [NN] EdgePredictor (#3518)
* Update

* Update

* Fix

* Update

* Update

* update

* Fix test

* CI

* CI
2021-12-02 14:25:31 +08:00
Krzysztof Sadowski 8dbf3a4716 [NN] Fix GATv2Conv residual for mini-batch (#3535) 2021-11-22 23:44:34 +08:00
VoVAllen ea8b5d7933 fix #2278 2021-11-22 10:53:27 +00:00
Jinjing Zhou 7b4b8129e3 Add edge_weight parameters to nn modules (#3455)
* add

* fix optional docing

* fix

* lint

* add normalized by edge weight

* add test

* fix

* lint

* fix docs

* fix

* fix docs
2021-11-21 14:59:46 +08:00
Mufei Li 9e7fbf9567 [NN] JumpingKnowledge (#3512)
* Update

* Fix
2021-11-19 16:37:25 +08:00
Mufei Li dfa32ae092 [NN] GNNExplainer (#3490)
* Update

* Update

* Update

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* Fix

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* lint fix

* lint fix

* Fix lint

* Update

* Fix CI

* Fix CI

* Fix

* CI

* Fix

* Update

* Fix

* Fix

* Fix CI

* Fix CI
2021-11-11 02:22:22 +08:00