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

Method update_from_graph_def

python/graphscope/framework/graph.py:921–950  ·  view source on GitHub ↗
(self, graph_def)

Source from the content-addressed store, hash-verified

919 self._learning_instance_list = []
920
921 def update_from_graph_def(self, graph_def):
922 if graph_def.graph_type == graph_def_pb2.ARROW_FLATTENED:
923 self._graph_node._graph_type = graph_def_pb2.ARROW_FLATTENED
924 check_argument(
925 self._graph_node.graph_type == graph_def.graph_type,
926 "Graph type doesn't match {} versus {}".format(
927 self._graph_node.graph_type, graph_def.graph_type
928 ),
929 )
930 self._key = graph_def.key
931 self._directed = graph_def.directed
932 self._is_multigraph = graph_def.is_multigraph
933 self._compact_edges = graph_def.compact_edges
934 self._use_perfect_hash = graph_def.use_perfect_hash
935 vy_info = graph_def_pb2.VineyardInfoPb()
936 graph_def.extension.Unpack(vy_info)
937 self._vineyard_id = vy_info.vineyard_id
938 self._fragments = list(vy_info.fragments)
939 self._oid_type = data_type_to_cpp(vy_info.oid_type)
940 self._vid_type = data_type_to_cpp(vy_info.vid_type)
941 self._generate_eid = vy_info.generate_eid
942 self._retain_oid = vy_info.retain_oid
943
944 self._schema_path = vy_info.schema_path
945 self._schema.from_graph_def(graph_def)
946 self._v_labels = self._schema.vertex_labels
947 self._e_labels = self._schema.edge_labels
948 self._e_relationships = self._schema.edge_relationships
949 # init saved_signature (must be after init schema)
950 self._saved_signature = self.signature
951
952 def __getattr__(self, name):
953 if hasattr(self._graph_node, name):

Callers 1

_rebuild_graphMethod · 0.95

Calls 4

check_argumentFunction · 0.90
data_type_to_cppFunction · 0.90
from_graph_defMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected