MCPcopy Create free account
hub / github.com/alibaba/GraphScope / check_edge

Method check_edge

python/graphscope/learning/gl_torch_graph.py:59–66  ·  view source on GitHub ↗
(schema, edge)

Source from the content-addressed store, hash-verified

57
58 @staticmethod
59 def check_edge(schema, edge):
60 if not isinstance(edge, tuple) or len(edge) != 3:
61 raise ValueError("Each edge should be a tuple of length 3")
62 for vertex_label in [edge[0], edge[2]]:
63 if vertex_label not in schema.vertex_labels:
64 raise ValueError(f"Invalid edge label: {vertex_label}")
65 if edge[1] not in schema.edge_labels:
66 raise ValueError(f"Invalid edge label: {edge[1]}")
67
68 @staticmethod
69 def check_edges(schema, edges):

Callers 3

check_edgesMethod · 0.80
check_edge_featuresMethod · 0.80
check_edge_weightsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected