Unverified Commit 73acefea authored by pyynb's avatar pyynb Committed by GitHub
Browse files

[GraphBolt] Fix doc string of DiskBasedFeature (#7314)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-2-128.us-west-2.compute.internal>
parent 4546e54f
...@@ -250,7 +250,9 @@ class DiskBasedFeature(Feature): ...@@ -250,7 +250,9 @@ class DiskBasedFeature(Feature):
>>> import torch >>> import torch
>>> from dgl import graphbolt as gb >>> from dgl import graphbolt as gb
>>> torch_feat = torch.arange(10).reshape(2, -1) >>> torch_feat = torch.arange(10).reshape(2, -1)
>>> feature = gb.DiskBasedFeature(torch_feat) >>> pth = "path/to/feat.npy"
>>> np.save(pth,torch_feat)
>>> feature = gb.DiskBasedFeature(pth)
>>> feature.read(torch.tensor([0])) >>> feature.read(torch.tensor([0]))
tensor([[0, 1, 2, 3, 4]]) tensor([[0, 1, 2, 3, 4]])
>>> feature.size() >>> feature.size()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment