dgl.dataloading¶
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 Sampler
.
Creating new samplers follow the same paradigm. Read our user guide chapter
Chapter 6: Stochastic Training on Large Graphs for more examples and explanations.
The entire package only works for PyTorch backend.
DataLoaders¶
Sampled graph data loader. |
|
Batched graph data loader. |
|
(DEPRECATED) Sampled graph data loader over a set of nodes. |
|
(DEPRECATED) Sampled graph data loader over a set of edges. |
|
Sampled graph data loader over nodes for distributed graph storage. |
|
Sampled graph data loader over edges for distributed graph storage. |
Samplers¶
Base class for graph samplers. |
|
Sampler that builds computational dependency of node representations via neighbor sampling for multilayer GNN. |
|
Sampler that builds computational dependency of node representations by taking messages from all neighbors for multilayer GNN. |
|
Cluster sampler from Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks |
|
K-hop subgraph sampler from Deep Graph Neural Networks with Shallow Subgraph Samplers. |
|
Random node/edge/walk sampler from GraphSAINT: Graph Sampling Based Inductive Learning Method |
Sampler Transformations¶
|
Create an edge-wise sampler from a node-wise sampler. |
|
Base class for sampling mini-batches in the form of Message-passing Flow Graphs (MFGs). |
Negative Samplers for Link Prediction¶
Negative sampler that randomly chooses negative destination nodes for each source node according to a uniform distribution. |
|
Negative sampler that randomly chooses negative source-destination pairs according to a uniform distribution. |
Utility Class and Functions for Feature Prefetching¶
Assign lazy features to the |
|
Assign lazy features to the |
|
Assign lazy features to the |
|
Assign lazy features to the |
|
Placeholder for feature prefetching. |