dgl.dataloadingο
The dgl.dataloading
package provides two primitives 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. |
|
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 via labor sampling for multilayer GNN from the NeurIPS 2023 paper Layer-Neighbor Sampling -- Defusing Neighborhood Explosion in GNNs |
|
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ο
alias of |
|
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. |