graphscope.framework.dag_utils.report_graphΒΆ
- graphscope.framework.dag_utils.report_graph(graph, report_type, node=None, edge=None, fid=None, lid=None, key=None, label_id=None, gid=None)[source]ΒΆ
Create report operation for nx graph.
This operation is used to simulate networkx graph reporting methods with variaty report type and corresponding config parameters.
- Parameters:
graph (nx.Graph) β A nx graph.
report_type β
report type, can be type_pb2.(NODE_NUM,
EDGE_NUM, HAS_NODE, HAS_EDGE, NODE_DATA, EDGE_DATA, NEIGHBORS_BY_NODE, SUCCS_BY_NODE, PREDS_BY_NODE, NEIGHBORS_BY_LOC, SUCCS_BY_LOC, PREDS_BY_LOC, DEG_BY_NODE, IN_DEG_BY_NODE, OUT_DEG_BY_NODE, DEG_BY_LOC, IN_DEG_BY_LOC, OUT_DEG_BY_LOC, NODES_BY_LOC)
node (str) β node id, used as node id with βNODEβ report types. (optional)
edge (str) β an edge with βEDGEβ report types. (optional)
fid (int) β fragment id, with βLOCβ report types. (optional)
lid (int) β local id of node in grape_engine, with βLOC; report types. (optional)
key (str) β edge key for MultiGraph or MultiDiGraph, with βEDGEβ report types. (optional)
- Returns:
An op to do reporting job.