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
d0fa2909
Unverified
Commit
d0fa2909
authored
Jun 01, 2023
by
Rhett Ying
Committed by
GitHub
Jun 01, 2023
Browse files
[GraphBolt] import when necessary for DistDGL (#5755)
parent
7eef3e0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
python/dgl/distributed/partition.py
python/dgl/distributed/partition.py
+3
-2
No files found.
python/dgl/distributed/partition.py
View file @
d0fa2909
...
@@ -25,8 +25,6 @@ from .graph_partition_book import (
...
@@ -25,8 +25,6 @@ from .graph_partition_book import (
RangePartitionBook
,
RangePartitionBook
,
)
)
if
F
.
backend_name
==
"pytorch"
:
from
..
import
graphbolt
RESERVED_FIELD_DTYPE
=
{
RESERVED_FIELD_DTYPE
=
{
"inner_node"
:
F
.
uint8
,
# A flag indicates whether the node is inside a partition.
"inner_node"
:
F
.
uint8
,
# A flag indicates whether the node is inside a partition.
...
@@ -1220,6 +1218,9 @@ def convert_dgl_partition_to_csc_sampling_graph(part_config):
...
@@ -1220,6 +1218,9 @@ def convert_dgl_partition_to_csc_sampling_graph(part_config):
part_config : str
part_config : str
The partition configuration JSON file.
The partition configuration JSON file.
"""
"""
# As only this function requires GraphBolt for now, let's import here.
from
..
import
graphbolt
part_meta
=
_load_part_config
(
part_config
)
part_meta
=
_load_part_config
(
part_config
)
num_parts
=
part_meta
[
"num_parts"
]
num_parts
=
part_meta
[
"num_parts"
]
...
...
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