Skip to content

Commit

Permalink
[Distributed Example] Check args.num_servers with DGL_NUM_SERVER (dml…
Browse files Browse the repository at this point in the history
…c#2203)

* update

* update

* update
  • Loading branch information
aksnzhy authored Sep 16, 2020
1 parent b25bbe6 commit 3926024
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/pytorch/graphsage/experimental/train_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ def main(args):
parser.add_argument('--close_profiler', action='store_true', help='Close pyinstrument profiler')
args = parser.parse_args()
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)
main(args)
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,9 @@ def main(args):
help="whether to remove edges during sampling")
args = parser.parse_args()
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)
main(args)

0 comments on commit 3926024

Please sign in to comment.