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)
| 28 | |
| 29 | |
| 30 | def 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 | |
| 52 | def clear_mutation_cache(func): |
no test coverage detected