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

Function init_empty_graph_in_engine

python/graphscope/nx/utils/misc.py:30–49  ·  view source on GitHub ↗

initialize an empty graph in grape_engine with the graph metadata. Parameters: ----------- graph: the graph instance in python. graph_type: the graph type of graph (IMMUTABLE, ARROW, DYNAMIC).

(graph, directed, distributed=True)

Source from the content-addressed store, hash-verified

28
29
30def init_empty_graph_in_engine(graph, directed, distributed=True):
31 """initialize an empty graph in grape_engine with the graph metadata.
32
33 Parameters:
34 -----------
35 graph: the graph instance in python.
36 graph_type: the graph type of graph (IMMUTABLE, ARROW, DYNAMIC).
37
38 """
39 op = dag_utils.create_graph(
40 graph.session.session_id,
41 graph_type=graph._graph_type,
42 directed=directed,
43 distributed=distributed,
44 efile="",
45 vfile="",
46 )
47 graph._op = op
48 graph_def = op.eval(leaf=False)
49 return graph_def
50
51
52def clear_mutation_cache(func):

Callers 3

__init__Method · 0.90
clearMethod · 0.90
__init__Method · 0.90

Calls 2

create_graphMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected