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
344be1ef
Unverified
Commit
344be1ef
authored
Nov 08, 2022
by
xiang song(charlie.song)
Committed by
GitHub
Nov 09, 2022
Browse files
[Dist] Fix typo of metis preprocess in dist partitin pipeline
parent
7d9a615a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tools/distpartitioning/parmetis_preprocess.py
tools/distpartitioning/parmetis_preprocess.py
+3
-3
No files found.
tools/distpartitioning/parmetis_preprocess.py
View file @
344be1ef
...
@@ -293,8 +293,8 @@ def gen_parmetis_input_args(params, schema_map):
...
@@ -293,8 +293,8 @@ def gen_parmetis_input_args(params, schema_map):
# num_constraints = no. of node types + train_mask + test_mask + val_mask
# num_constraints = no. of node types + train_mask + test_mask + val_mask
# Here, (train/test/val) masks will be set to 1 if these masks exist for
# Here, (train/test/val) masks will be set to 1 if these masks exist for
# all the node types in the graph, otherwise these flags will be set to 0
# all the node types in the graph, otherwise these flags will be set to 0
assert
constants
.
GRAPH_NAME
e
in
schema_map
,
"Graph name is not present in the json file"
assert
constants
.
STR_
GRAPH_NAME
in
schema_map
,
"Graph name is not present in the json file"
graph_name
=
schema_map
[
constants
.
GRAPH_NAME
]
graph_name
=
schema_map
[
constants
.
STR_
GRAPH_NAME
]
if
not
os
.
path
.
isfile
(
f
'
{
graph_name
}
_stats.txt'
):
if
not
os
.
path
.
isfile
(
f
'
{
graph_name
}
_stats.txt'
):
num_nodes
=
np
.
sum
(
np
.
concatenate
(
schema_map
[
constants
.
STR_NUM_NODES_PER_CHUNK
]))
num_nodes
=
np
.
sum
(
np
.
concatenate
(
schema_map
[
constants
.
STR_NUM_NODES_PER_CHUNK
]))
num_edges
=
np
.
sum
(
np
.
concatenate
(
schema_map
[
constants
.
STR_NUM_EDGES_PER_CHUNK
]))
num_edges
=
np
.
sum
(
np
.
concatenate
(
schema_map
[
constants
.
STR_NUM_EDGES_PER_CHUNK
]))
...
@@ -312,7 +312,7 @@ def gen_parmetis_input_args(params, schema_map):
...
@@ -312,7 +312,7 @@ def gen_parmetis_input_args(params, schema_map):
train_mask
=
train_mask
//
num_ntypes
train_mask
=
train_mask
//
num_ntypes
test_mask
=
test_mask
//
num_ntypes
test_mask
=
test_mask
//
num_ntypes
val_mask
=
val_mask
//
num_ntypes
val_mask
=
val_mask
//
num_ntypes
num_constraints
=
num_nyp
t
es
+
train_mask
+
test_mask
+
val_mask
num_constraints
=
num_n
t
ypes
+
train_mask
+
test_mask
+
val_mask
with
open
(
f
'
{
graph_name
}
_stats.txt'
,
'w'
)
as
sf
:
with
open
(
f
'
{
graph_name
}
_stats.txt'
,
'w'
)
as
sf
:
sf
.
write
(
f
'
{
num_nodes
}
{
num_edges
}
{
num_constraints
}
'
)
sf
.
write
(
f
'
{
num_nodes
}
{
num_edges
}
{
num_constraints
}
'
)
...
...
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