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
39260242
Unverified
Commit
39260242
authored
Sep 16, 2020
by
Chao Ma
Committed by
GitHub
Sep 16, 2020
Browse files
[Distributed Example] Check args.num_servers with DGL_NUM_SERVER (#2203)
* update * update * update
parent
b25bbe64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
examples/pytorch/graphsage/experimental/train_dist.py
examples/pytorch/graphsage/experimental/train_dist.py
+3
-1
examples/pytorch/graphsage/experimental/train_dist_unsupervised.py
...pytorch/graphsage/experimental/train_dist_unsupervised.py
+4
-2
No files found.
examples/pytorch/graphsage/experimental/train_dist.py
View file @
39260242
...
@@ -316,7 +316,9 @@ if __name__ == '__main__':
...
@@ -316,7 +316,9 @@ if __name__ == '__main__':
parser
.
add_argument
(
'--close_profiler'
,
action
=
'store_true'
,
help
=
'Close pyinstrument profiler'
)
parser
.
add_argument
(
'--close_profiler'
,
action
=
'store_true'
,
help
=
'Close pyinstrument profiler'
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
assert
args
.
num_workers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
)),
\
assert
args
.
num_workers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
)),
\
'The num_workers should be the same value with num_samplers.'
'The num_workers should be the same value with DGL_NUM_SAMPLER.'
assert
args
.
num_servers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SERVER'
)),
\
'The num_servers should be the same value with DGL_NUM_SERVER.'
print
(
args
)
print
(
args
)
main
(
args
)
main
(
args
)
examples/pytorch/graphsage/experimental/train_dist_unsupervised.py
View file @
39260242
...
@@ -486,7 +486,9 @@ if __name__ == '__main__':
...
@@ -486,7 +486,9 @@ if __name__ == '__main__':
help
=
"whether to remove edges during sampling"
)
help
=
"whether to remove edges during sampling"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
assert
args
.
num_workers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
)),
\
assert
args
.
num_workers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
)),
\
'The num_workers should be the same value with num_samplers.'
'The num_workers should be the same value with DGL_NUM_SAMPLER.'
assert
args
.
num_servers
==
int
(
os
.
environ
.
get
(
'DGL_NUM_SERVER'
)),
\
'The num_servers should be the same value with DGL_NUM_SERVER.'
print
(
args
)
print
(
args
)
main
(
args
)
main
(
args
)
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