"docs/git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "8e9ff15faff8acf6bf5c13e19a7e2790e61af470"
dgl.dataloading.rst 1.98 KB
Newer Older
1
2
3
4
5
.. _api-dataloading:

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

6
.. currentmodule:: dgl.dataloading
7

8
9
10
11
12
13
14
15
16
17
18
The ``dgl.dataloading`` package provides two privimitives to compose a data pipeline
for loading from graph data. ``Sampler`` represents algorithms
to generate subgraph samples from the original graph, and ``DataLoader``
represents the iterable over these samples.

DGL provides a number of built-in samplers that subclass :class:`~dgl.dataloading.Sampler`.
Creating new samplers follow the same paradigm. Read our user guide chapter
:ref:`guide-minibatch` for more examples and explanations.

The entire package only works for PyTorch backend.

19
20
21
DataLoaders
-----------

22
23
.. autosummary::
    :toctree: ../../generated/
24
25
    :nosignatures:
    :template: classtemplate.rst
26

27
    DataLoader
28
    GraphDataLoader
29
30
31
32
    NodeDataLoader
    EdgeDataLoader
    DistNodeDataLoader
    DistEdgeDataLoader
33

34
.. _api-dataloading-neighbor-sampling:
35

36
37
Samplers
--------
38

39
40
.. autosummary::
    :toctree: ../../generated/
41
42
    :nosignatures:
    :template: classtemplate.rst
43

44
45
46
47
48
    Sampler
    NeighborSampler
    MultiLayerFullNeighborSampler
    ClusterGCNSampler
    ShaDowKHopSampler
49
50
51
52
53
54
55
56
    SAINTSampler

Sampler Transformations
-----------------------

.. autosummary::
    :toctree: ../../generated/

57
    as_edge_prediction_sampler
58
    BlockSampler
59

60
.. _api-dataloading-negative-sampling:
61
62
63
64
65

Negative Samplers for Link Prediction
-------------------------------------
.. currentmodule:: dgl.dataloading.negative_sampler

66
67
.. autosummary::
    :toctree: ../../generated/
68
69
    :nosignatures:
    :template: classtemplate.rst
70

71
72
73
    Uniform
    PerSourceUniform
    GlobalUniform
74

75
76
77
Utility Class and Functions for Feature Prefetching
---------------------------------------------------
.. currentmodule:: dgl.dataloading.base
78

79
80
.. autosummary::
    :toctree: ../../generated/
81
82
    :nosignatures:
    :template: classtemplate.rst
83

84
85
86
87
    set_node_lazy_features
    set_edge_lazy_features
    set_src_lazy_features
    set_dst_lazy_features
88
    LazyFeature