Skip to content

Commit bde0ec9

Browse files
authored
Fix flaky compute_world_size test on devservers and make pyre happy
Differential Revision: D71576534 Pull Request resolved: #1030
1 parent a04dc77 commit bde0ec9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.

torchx/examples/apps/compute_world_size/module/test/util_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ def test_compute_world_size(self) -> None:
2626
"rank": 0,
2727
"world_size": 1,
2828
"master_addr": "localhost",
29-
# ephemeral port range in linux
30-
"master_port": random.randint(32768, 60999),
29+
# specifying 0 as master_port makes TCPStore chose a free random port
30+
"master_port": 0,
3131
"backend": "gloo",
3232
}
3333
}

0 commit comments

Comments
 (0)