Unverified Commit b0d26199 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[GraphBolt] refine graph representation (#6733)

parent bc733a74
......@@ -1022,10 +1022,18 @@ def _csc_sampling_graph_str(graph: FusedCSCSamplingGraph) -> str:
"""
csc_indptr_str = str(graph.csc_indptr)
indices_str = str(graph.indices)
meta_str = (
f"total_num_nodes={graph.total_num_nodes}, total_num_edges="
f"{graph.total_num_edges}"
)
meta_str = f"num_nodes={graph.total_num_nodes}, num_edges={graph.num_edges}"
if graph.node_type_offset is not None:
meta_str += f", node_type_offset={graph.node_type_offset}"
if graph.type_per_edge is not None:
meta_str += f", type_per_edge={graph.type_per_edge}"
if graph.node_type_to_id is not None:
meta_str += f", node_type_to_id={graph.node_type_to_id}"
if graph.edge_type_to_id is not None:
meta_str += f", edge_type_to_id={graph.edge_type_to_id}"
if graph.edge_attributes is not None:
meta_str += f", edge_attributes={graph.edge_attributes}"
prefix = f"{type(graph).__name__}("
def _add_indent(_str, indent):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment