class dgl.dataloading.base.set_dst_lazy_features[source]

Assign lazy features to the dstdata of the input graph for prefetching optimization.

When used in a Sampler, lazy features mark which data should be fetched before computation in model. See 6.8 Feature Prefetching for a detailed explanation.

If the graph is homogeneous, this is equivalent to:

g.dstdata.update({k: LazyFeature(k, g.dstdata[dgl.NID]) for k in feature_names})

If the graph is heterogeneous, this is equivalent to:

for type_, names in feature_names.items():
        {k: LazyFeature(k, g.dstnodes[type_].data[dgl.NID]) for k in names})

See also