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
484bbcc8
"git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "3b8a33e9c5cc5eea9b48e467682827787af9ac60"
Unverified
Commit
484bbcc8
authored
Jun 10, 2020
by
Jinjing Zhou
Committed by
GitHub
Jun 10, 2020
Browse files
[Test] Fix partition ci fail (#1614)
parent
48cc8fa8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
python/dgl/distributed/partition.py
python/dgl/distributed/partition.py
+4
-4
No files found.
python/dgl/distributed/partition.py
View file @
484bbcc8
...
@@ -134,8 +134,8 @@ def load_partition(conf_file, part_id):
...
@@ -134,8 +134,8 @@ def load_partition(conf_file, part_id):
assert
'num_edges'
in
part_metadata
,
"cannot get the number of edges of the global graph."
assert
'num_edges'
in
part_metadata
,
"cannot get the number of edges of the global graph."
assert
'node_map'
in
part_metadata
,
"cannot get the node map."
assert
'node_map'
in
part_metadata
,
"cannot get the node map."
assert
'edge_map'
in
part_metadata
,
"cannot get the edge map."
assert
'edge_map'
in
part_metadata
,
"cannot get the edge map."
node_map
=
np
.
load
(
part_metadata
[
'node_map'
])
node_map
=
np
.
load
(
part_metadata
[
'node_map'
]
,
allow_pickle
=
True
)
edge_map
=
np
.
load
(
part_metadata
[
'edge_map'
])
edge_map
=
np
.
load
(
part_metadata
[
'edge_map'
]
,
allow_pickle
=
True
)
meta
=
(
part_metadata
[
'num_nodes'
],
part_metadata
[
'num_edges'
],
node_map
,
edge_map
,
num_parts
)
meta
=
(
part_metadata
[
'num_nodes'
],
part_metadata
[
'num_edges'
],
node_map
,
edge_map
,
num_parts
)
assert
NID
in
graph
.
ndata
,
"the partition graph should contain node mapping to global node Id"
assert
NID
in
graph
.
ndata
,
"the partition graph should contain node mapping to global node Id"
assert
EID
in
graph
.
edata
,
"the partition graph should contain edge mapping to global edge Id"
assert
EID
in
graph
.
edata
,
"the partition graph should contain edge mapping to global edge Id"
...
@@ -231,8 +231,8 @@ def partition_graph(g, graph_name, num_parts, out_path, num_hops=1, part_method=
...
@@ -231,8 +231,8 @@ def partition_graph(g, graph_name, num_parts, out_path, num_hops=1, part_method=
out_path
=
os
.
path
.
abspath
(
out_path
)
out_path
=
os
.
path
.
abspath
(
out_path
)
node_part_file
=
os
.
path
.
join
(
out_path
,
"node_map"
)
node_part_file
=
os
.
path
.
join
(
out_path
,
"node_map"
)
edge_part_file
=
os
.
path
.
join
(
out_path
,
"edge_map"
)
edge_part_file
=
os
.
path
.
join
(
out_path
,
"edge_map"
)
np
.
save
(
node_part_file
,
F
.
asnumpy
(
node_parts
),
allow_pickle
=
Fals
e
)
np
.
save
(
node_part_file
,
F
.
asnumpy
(
node_parts
),
allow_pickle
=
Tru
e
)
np
.
save
(
edge_part_file
,
edge_parts
,
allow_pickle
=
Fals
e
)
np
.
save
(
edge_part_file
,
edge_parts
,
allow_pickle
=
Tru
e
)
part_metadata
=
{
'graph_name'
:
graph_name
,
part_metadata
=
{
'graph_name'
:
graph_name
,
'num_nodes'
:
g
.
number_of_nodes
(),
'num_nodes'
:
g
.
number_of_nodes
(),
'num_edges'
:
g
.
number_of_edges
(),
'num_edges'
:
g
.
number_of_edges
(),
...
...
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