How to disable feature fetching completely?

From the line, it indicates that block contains the feature which is evident from the NeighborSampler implementation, e.g., prefetching. We would like to implement the fetching part ourselves, is there a way to completely disable fetching in the default pipeline?

Thanks

If you do not specify prefetch_node_feats=['feat'], the features are not prefetched (disabled).

If you want to implement your own prefetching, you can modify the _prefetch in dataloader.

Thanks for your reply.

Other than prefetching, are there any other steps that will fetch features during the training? Does that mean if we do not specify prefetch_node_feats=['feat'] in the sampler, then there won’t be any feature included in any dgl data structures (like block)? If that is not the case, how to avoid fetching features during the entire training process?

I am wondering how to you want to implement the fetching part yourselves?

If feature prefetching is disabled, features are fetched upon usage during training. You can refer to this post for an understanding of sampling. For understanding feature prefetching, refer to this post.

The easiest way to avoid any feature fetching from DGL is to avoid having any features in g.ndata and g.edata altogether. The sampled node/edge IDs can be obtained with block.ndata[dgl.NID] and block.edata[dgl.EID]. You can use them to fetch your own features.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.