Skip to content

Commit

Permalink
[Transform] Docstring and subframes (dmlc#1962)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: xiang song(charlie.song) <[email protected]>
  • Loading branch information
3 people authored Aug 13, 2020
1 parent 6294677 commit cd48435
Show file tree
Hide file tree
Showing 19 changed files with 1,000 additions and 697 deletions.
34 changes: 0 additions & 34 deletions docs/source/api/python/dataloading.rst

This file was deleted.

56 changes: 56 additions & 0 deletions docs/source/api/python/dgl.dataloading.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.. _api-dataloading:

dgl.dataloading
=================================

.. automodule:: dgl.dataloading

DataLoaders
-----------

PyTorch node/edge DataLoaders
`````````````````````````````

.. currentmodule:: dgl.dataloading.pytorch

.. autoclass:: NodeDataLoader
.. autoclass:: EdgeDataLoader

General collating functions
```````````````````````````

.. currentmodule:: dgl.dataloading

.. autoclass:: Collator
:members: dataset, collate

.. autoclass:: NodeCollator
:members: dataset, collate

.. autoclass:: EdgeCollator
:members: dataset, collate

Neighborhood Sampling Classes
-----------------------------

Base Multi-layer Neighborhood Sampling Class
````````````````````````````````````````````

.. autoclass:: BlockSampler
:members: sample_frontier, sample_blocks

Uniform Node-wise Neighbor Sampling (GraphSAGE style)
`````````````````````````````````````````````````````

.. autoclass:: MultiLayerNeighborSampler
:members: sample_frontier

.. _negative-sampling:

Negative Samplers for Link Prediction
-------------------------------------

.. currentmodule:: dgl.dataloading.negative_sampler

.. autoclass:: Uniform
:members: __call__
2 changes: 1 addition & 1 deletion docs/source/api/python/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ API Reference
dgl.ops
dgl.function
sampling
dataloading
dgl.dataloading
2 changes: 0 additions & 2 deletions docs/source/api/python/sampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ dgl.sampling

.. automodule:: dgl.sampling

Sampling algorithms on graphs.

Random walk sampling functions
------------------------------

Expand Down
32 changes: 0 additions & 32 deletions docs/source/api/python/transform.rst

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Getting Started
api/python/dgl.ops
api/python/dgl.function
api/python/sampling
api/python/dgl.dataloading

.. toctree::
:maxdepth: 3
Expand Down
4 changes: 2 additions & 2 deletions python/dgl/dataloading/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
This includes
* :py:class:`~dgl.dataloading.pytorch.NodeDataLoader`` for iterating over the nodes in
* :py:class:`~dgl.dataloading.pytorch.NodeDataLoader` for iterating over the nodes in
a graph in minibatches.
* :py:class:`~dgl.dataloading.pytorch.EdgeDataLoader`` for iterating over the edges in
* :py:class:`~dgl.dataloading.pytorch.EdgeDataLoader` for iterating over the edges in
a graph in minibatches.
* Various sampler classes that perform neighborhood sampling for multi-layer GNNs.
Expand Down
Loading

0 comments on commit cd48435

Please sign in to comment.