dgl.dataloading.EdgeDataLoader

class dgl.dataloading.EdgeDataLoader(graph, indices, graph_sampler, device=None, use_ddp=False, ddp_seed=0, batch_size=1, drop_last=False, shuffle=False, use_prefetch_thread=False, use_alternate_streams=True, pin_prefetcher=False, exclude=None, reverse_eids=None, reverse_etypes=None, negative_sampler=None, use_uva=False, **kwargs)[source]

(DEPRECATED) Sampled graph data loader over a set of edges.

Deprecated since version 0.8: The class is deprecated since v0.8 – its function has been covered by DataLoader and as_edge_prediction_sampler().

To migrate, change the legacy usage like:

sampler = dgl.dataloading.MultiLayerNeighborSampler([15, 10, 5])
dataloader = dgl.dataloading.EdgeDataLoader(
    g, train_eid, sampler, exclude='reverse_id',
    reverse_eids=reverse_eids,
    negative_sampler=dgl.dataloading.negative_sampler.Uniform(5),
    batch_size=1024, shuffle=True, drop_last=False, num_workers=4)

to:

sampler = dgl.dataloading.MultiLayerNeighborSampler([15, 10, 5])
sampler = dgl.dataloading.as_edge_prediction_sampler(
    sampler, exclude='reverse_id',
    reverse_eids=reverse_eids,
    negative_sampler=dgl.dataloading.negative_sampler.Uniform(5))
dataloader = dgl.dataloading.DataLoader(
    g, train_eid, sampler,
    batch_size=1024, shuffle=True, drop_last=False, num_workers=4)
__init__(graph, indices, graph_sampler, device=None, use_ddp=False, ddp_seed=0, batch_size=1, drop_last=False, shuffle=False, use_prefetch_thread=False, use_alternate_streams=True, pin_prefetcher=False, exclude=None, reverse_eids=None, reverse_etypes=None, negative_sampler=None, use_uva=False, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(graph, indices, graph_sampler[, …])

Initialize self.

attach_data(name, data)

Add a data other than node and edge features for prefetching.

check_worker_number_rationality()

Attributes

multiprocessing_context