Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
b0d26199
Unverified
Commit
b0d26199
authored
Dec 13, 2023
by
Rhett Ying
Committed by
GitHub
Dec 13, 2023
Browse files
[GraphBolt] refine graph representation (#6733)
parent
bc733a74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
python/dgl/graphbolt/impl/fused_csc_sampling_graph.py
python/dgl/graphbolt/impl/fused_csc_sampling_graph.py
+12
-4
No files found.
python/dgl/graphbolt/impl/fused_csc_sampling_graph.py
View file @
b0d26199
...
@@ -1022,10 +1022,18 @@ def _csc_sampling_graph_str(graph: FusedCSCSamplingGraph) -> str:
...
@@ -1022,10 +1022,18 @@ def _csc_sampling_graph_str(graph: FusedCSCSamplingGraph) -> str:
"""
"""
csc_indptr_str
=
str
(
graph
.
csc_indptr
)
csc_indptr_str
=
str
(
graph
.
csc_indptr
)
indices_str
=
str
(
graph
.
indices
)
indices_str
=
str
(
graph
.
indices
)
meta_str
=
(
meta_str
=
f
"num_nodes=
{
graph
.
total_num_nodes
}
, num_edges=
{
graph
.
num_edges
}
"
f
"total_num_nodes=
{
graph
.
total_num_nodes
}
, total_num_edges="
if
graph
.
node_type_offset
is
not
None
:
f
"
{
graph
.
total_num_edges
}
"
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__
}
("
prefix
=
f
"
{
type
(
graph
).
__name__
}
("
def
_add_indent
(
_str
,
indent
):
def
_add_indent
(
_str
,
indent
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment