"tests/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "96297fb8fdd629fc2fd52872d718d78fa491cba1"
Unverified Commit c2cd6eb2 authored by Minjie Wang's avatar Minjie Wang Committed by GitHub
Browse files

[Doc] Reorg doc (#1989)

parent e4b4fcff
.. _apibatch_heterograph:
dgl.batched_heterograph
=========================================================================
.. currentmodule:: dgl
.. autoclass:: BatchedDGLHeteroGraph
Merge and decompose
-------------------
.. autosummary::
:toctree: ../../generated/
batch_hetero
unbatch_hetero
Query batch summary
----------------------
.. autosummary::
:toctree: ../../generated/
BatchedDGLHeteroGraph.batch_size
BatchedDGLHeteroGraph.batch_num_nodes
BatchedDGLHeteroGraph.batch_num_edges
.. _apigraph:
dgl.DGLHeteroGraph
=====================================================
.. currentmodule:: dgl
.. autoclass:: DGLHeteroGraph
Querying metagraph structure
----------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.ntypes
DGLHeteroGraph.etypes
DGLHeteroGraph.canonical_etypes
DGLHeteroGraph.metagraph
DGLHeteroGraph.to_canonical_etype
DGLHeteroGraph.get_ntype_id
DGLHeteroGraph.get_etype_id
Querying graph structure
------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.number_of_nodes
DGLHeteroGraph.number_of_edges
DGLHeteroGraph.is_multigraph
DGLHeteroGraph.has_nodes
DGLHeteroGraph.has_edges_between
DGLHeteroGraph.predecessors
DGLHeteroGraph.successors
DGLHeteroGraph.edge_ids
DGLHeteroGraph.find_edges
DGLHeteroGraph.in_edges
DGLHeteroGraph.out_edges
DGLHeteroGraph.all_edges
DGLHeteroGraph.in_degrees
DGLHeteroGraph.out_degrees
Querying and manipulating sparse format
---------------------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.format_in_use
DGLHeteroGraph.restrict_format
DGLHeteroGraph.to_format
Querying and manipulating index data type
-----------------------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.idtype
DGLHeteroGraph.long
DGLHeteroGraph.int
Using Node/edge features
------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.nodes
DGLHeteroGraph.ndata
DGLHeteroGraph.edges
DGLHeteroGraph.edata
DGLHeteroGraph.node_attr_schemes
DGLHeteroGraph.edge_attr_schemes
DGLHeteroGraph.set_n_initializer
DGLHeteroGraph.set_e_initializer
DGLHeteroGraph.local_var
DGLHeteroGraph.local_scope
Transforming graph
------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.subgraph
DGLHeteroGraph.edge_subgraph
DGLHeteroGraph.node_type_subgraph
DGLHeteroGraph.edge_type_subgraph
Computing with DGLHeteroGraph
-----------------------------
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.apply_nodes
DGLHeteroGraph.apply_edges
DGLHeteroGraph.send_and_recv
DGLHeteroGraph.pull
DGLHeteroGraph.push
DGLHeteroGraph.update_all
DGLHeteroGraph.multi_update_all
DGLHeteroGraph.prop_nodes
DGLHeteroGraph.prop_edges
DGLHeteroGraph.filter_nodes
DGLHeteroGraph.filter_edges
DGLHeteroGraph.to
.. _apidgl:
dgl
=============================
.. currentmodule:: dgl
Graph Create Ops
-------------------------
.. autosummary::
:toctree: ../../generated/
graph
heterograph
from_scipy
from_networkx
bipartite_from_scipy
bipartite_from_networkx
rand_graph
rand_bipartite
knn_graph
segmented_knn_graph
Subgraph Extraction Routines
-------------------------------------
.. autosummary::
:toctree: ../../generated/
node_subgraph
edge_subgraph
node_type_subgraph
edge_type_subgraph
in_subgraph
out_subgraph
Graph Mutation Routines
---------------------------------
.. autosummary::
:toctree: ../../generated/
add_nodes
add_edges
remove_nodes
remove_edges
add_self_loop
remove_self_loop
add_reverse_edges
Graph Transform Routines
----------------------------------
.. autosummary::
:toctree: ../../generated/
reverse
to_bidirected
to_simple
to_block
compact_graphs
to_hetero
to_homo
to_networkx
line_graph
khop_graph
metapath_reachable_graph
Batching and Reading Out
-------------------------------
.. autosummary::
:toctree: ../../generated/
batch
unbatch
readout_nodes
readout_edges
sum_nodes
sum_edges
mean_nodes
mean_edges
max_nodes
max_edges
softmax_nodes
softmax_edges
broadcast_nodes
broadcast_edges
topk_nodes
topk_edges
Adjacency Related Routines
-------------------------------
.. autosummary::
:toctree: ../../generated/
khop_adj
laplacian_lambda_max
Propagate Messages by Traversals
------------------------------------------
.. autosummary::
:toctree: ../../generated/
prop_nodes
prop_nodes_bfs
prop_nodes_topo
prop_edges
prop_edges_dfs
Utilities
-----------------------------------------------
.. autosummary::
:toctree: ../../generated/
seed
...@@ -4,22 +4,10 @@ API Reference ...@@ -4,22 +4,10 @@ API Reference
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
graph dgl
heterograph dgl.DGLGraph
readout dgl.data
batch_heterograph
nn nn
init dgl.ops
ops dgl.function
function
traversal
propagate
udf
sampler
sampling sampling
data
transform
graph_store
nodeflow
random
model_zoo
Dataset
========================
Distributed Training
============================
Graph
=====
Graph chapter
User Guide
==========
.. toctree::
:maxdepth: 2
preface
graph
message
data
training
minibatch
distributed
Message Passing and Neural Network Modules
============================================
Stochastic Training on Large Graphs
=====================================
Preface
=======
Preface chapter
Training Graph Neural Networks
================================
...@@ -30,52 +30,45 @@ generative models on graphs, (previously) difficult-to-parallelize tree-based ...@@ -30,52 +30,45 @@ generative models on graphs, (previously) difficult-to-parallelize tree-based
models like TreeLSTM, etc. We also implement some conventional models in DGL models like TreeLSTM, etc. We also implement some conventional models in DGL
from a new graphical perspective yielding simplicity. from a new graphical perspective yielding simplicity.
Relationship of DGL to other frameworks
---------------------------------------
DGL is designed to be compatible and agnostic to the existing tensor
frameworks. It provides a backend adapter interface that allows easy porting
to other tensor-based, autograd-enabled frameworks.
Getting Started Getting Started
--------------- ---------------
Follow the :doc:`instructions<install/index>` to install DGL. * :doc:`Installation<install/index>`.
:doc:`DGL at a glance<tutorials/basics/1_first>` is the most common place to get started with. * :doc:`Quickstart tutorial<tutorials/basics/1_first>` for absolute beginners.
It offers a broad experience of using DGL for deep learning on graph data. * :doc:`User guide<guide/index>`.
You can learn other basic concepts of DGL through the dedicated tutorials. * :doc:`API reference manual<api/python/index>`.
* :doc:`End-to-end model tutorials<tutorials/models/index>` for learning DGL by popular models on graphs.
* Learn constructing graphs and set/get node and edge features :doc:`here<tutorials/basics/2_basics>`. ..
* Learn performing computation on graph using message passing :doc:`here<tutorials/basics/3_pagerank>`. Follow the :doc:`instructions<install/index>` to install DGL.
* Learn processing multiple graph samples in a batch :doc:`here<tutorials/basics/4_batch>`. :doc:`DGL at a glance<tutorials/basics/1_first>` is the most common place to get started with.
* Learn working with heterogeneous graph data :doc:`here<tutorials/basics/5_hetero>`. It offers a broad experience of using DGL for deep learning on graph data.
End-to-end model tutorials are other good starting points for learning DGL and popular API reference document lists more endetailed specifications of each API and GNN modules,
models on graphs. The model tutorials are categorized based on the way they utilize DGL APIs. a useful manual for in-depth developers.
* :ref:`Graph Neural Network and its variant <tutorials1-index>`: Learn how to use DGL to train You can learn other basic concepts of DGL through the dedicated tutorials.
popular **GNN models** on one input graph.
* :ref:`Dealing with many small graphs <tutorials2-index>`: Learn how to train models for
many graph samples such as sentence parse trees.
* :ref:`Generative models <tutorials3-index>`: Learn how to deal with **dynamically-changing graphs**.
* :ref:`Old (new) wines in new bottle <tutorials4-index>`: Learn how to combine DGL with tensor-based
DGL framework in a flexible way. Explore new perspective on traditional models by graphs.
* :ref:`Training on giant graphs <tutorials5-index>`: Learn how to train graph neural networks
on giant graphs.
Each tutorial is accompanied with a runnable python script and jupyter notebook that * Learn constructing graphs and set/get node and edge features :doc:`here<tutorials/basics/2_basics>`.
can be downloaded. If you would like the tutorials improved, please raise a github issue. * Learn performing computation on graph using message passing :doc:`here<tutorials/basics/3_pagerank>`.
* Learn processing multiple graph samples in a batch :doc:`here<tutorials/basics/4_batch>`.
* Learn working with heterogeneous graph data :doc:`here<tutorials/basics/5_hetero>`.
API reference document lists more endetailed specifications of each API and GNN modules, End-to-end model tutorials are other good starting points for learning DGL and popular
a useful manual for in-depth developers. models on graphs. The model tutorials are categorized based on the way they utilize DGL APIs.
.. toctree:: * :ref:`Graph Neural Network and its variant <tutorials1-index>`: Learn how to use DGL to train
:maxdepth: 1 popular **GNN models** on one input graph.
:caption: Installation * :ref:`Dealing with many small graphs <tutorials2-index>`: Learn how to train models for
:hidden: many graph samples such as sentence parse trees.
:glob: * :ref:`Generative models <tutorials3-index>`: Learn how to deal with **dynamically-changing graphs**.
* :ref:`Old (new) wines in new bottle <tutorials4-index>`: Learn how to combine DGL with tensor-based
DGL framework in a flexible way. Explore new perspective on traditional models by graphs.
* :ref:`Training on giant graphs <tutorials5-index>`: Learn how to train graph neural networks
on giant graphs.
install/index Each tutorial is accompanied with a runnable python script and jupyter notebook that
install/backend can be downloaded. If you would like the tutorials improved, please raise a github issue.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
...@@ -83,15 +76,23 @@ a useful manual for in-depth developers. ...@@ -83,15 +76,23 @@ a useful manual for in-depth developers.
:hidden: :hidden:
:glob: :glob:
tutorials/basics/index install/index
install/backend
tutorials/basics/1_first
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 2
:caption: Tutorials :caption: User Guide
:hidden: :hidden:
:glob: :glob:
tutorials/models/index guide/preface
guide/graph
guide/message
guide/data
guide/training
guide/minibatch
guide/distributed
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
...@@ -99,22 +100,21 @@ a useful manual for in-depth developers. ...@@ -99,22 +100,21 @@ a useful manual for in-depth developers.
:hidden: :hidden:
:glob: :glob:
api/python/graph api/python/dgl
api/python/heterograph api/python/dgl.DGLGraph
api/python/ops api/python/dgl.data
api/python/readout
api/python/batch_heterograph
api/python/nn api/python/nn
api/python/function api/python/dgl.ops
api/python/udf api/python/dgl.function
api/python/traversal
api/python/propagate
api/python/transform
api/python/sampler
api/python/sampling api/python/sampling
api/python/data
api/python/nodeflow .. toctree::
api/python/random :maxdepth: 3
:caption: Model Tutorials
:hidden:
:glob:
tutorials/models/index
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
...@@ -135,6 +135,13 @@ a useful manual for in-depth developers. ...@@ -135,6 +135,13 @@ a useful manual for in-depth developers.
env_var env_var
resources resources
Relationship of DGL to other frameworks
---------------------------------------
DGL is designed to be compatible and agnostic to the existing tensor
frameworks. It provides a backend adapter interface that allows easy porting
to other tensor-based, autograd-enabled frameworks.
Free software Free software
------------- -------------
DGL is free software; you can redistribute it and/or modify it under the terms DGL is free software; you can redistribute it and/or modify it under the terms
......
...@@ -30,6 +30,7 @@ from .subgraph import * ...@@ -30,6 +30,7 @@ from .subgraph import *
from .traversal import * from .traversal import *
from .transform import * from .transform import *
from .propagate import * from .propagate import *
from .random import *
from ._deprecate.graph import DGLGraph as DGLGraphStale from ._deprecate.graph import DGLGraph as DGLGraphStale
from ._deprecate.nodeflow import * from ._deprecate.nodeflow import *
...@@ -5,6 +5,8 @@ from ._ffi.function import _init_api ...@@ -5,6 +5,8 @@ from ._ffi.function import _init_api
from . import backend as F from . import backend as F
from . import ndarray as nd from . import ndarray as nd
__all__ = ['seed']
def seed(val): def seed(val):
"""Set the seed of randomized methods in DGL. """Set the seed of randomized methods in DGL.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment