Unverified Commit 5c1206de authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[Graphbolt] Update unit test to match the official edge format. (#6215)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent 968c52dd
......@@ -10,14 +10,14 @@ def test_basic_feature_store():
features = {}
features[("node", "paper", "a")] = gb.TorchBasedFeature(a)
features[("edge", "paper-cites-paper", "b")] = gb.TorchBasedFeature(b)
features[("edge", "paper:cites:paper", "b")] = gb.TorchBasedFeature(b)
feature_store = gb.BasicFeatureStore(features)
assert torch.equal(
feature_store.read("node", "paper", "a"), torch.tensor([3, 2, 1])
)
assert torch.equal(
feature_store.read("edge", "paper-cites-paper", "b"),
feature_store.read("edge", "paper:cites:paper", "b"),
torch.tensor([2, 5, 3]),
)
assert torch.equal(
......
......@@ -89,7 +89,7 @@ def test_torch_based_feature_store(in_memory):
),
gb.OnDiskFeatureData(
domain="edge",
type="paper-cites-paper",
type="paper:cites:paper",
name="b",
format="numpy",
path=os.path.join(test_dir, "b.npy"),
......@@ -101,7 +101,7 @@ def test_torch_based_feature_store(in_memory):
feature_store.read("node", "paper", "a"), torch.tensor([1, 2, 3])
)
assert torch.equal(
feature_store.read("edge", "paper-cites-paper", "b"),
feature_store.read("edge", "paper:cites:paper", "b"),
torch.tensor([2, 5, 3]),
)
......
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