Unverified Commit b03d70d3 authored by peizhou001's avatar peizhou001 Committed by GitHub
Browse files

[Graphbolt] Add fanout check (#5776)

parent 95cf6924
......@@ -269,6 +269,10 @@ class CSCSamplingGraph:
(fanouts >= 0) | (fanouts == -1)
), "Fanouts should consist of values that are either -1 or \
greater than or equal to 0."
if self.metadata and self.metadata.edge_type_to_id:
assert len(self.metadata.edge_type_to_id) == fanouts.size(
0
), "Fanouts should have the same number of elements as etypes."
return self._c_csc_graph.sample_neighbors(
nodes, fanouts.tolist(), replace, return_eids
)
......
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