File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 4
4
from torchft import Manager , ProcessGroupGloo
5
5
import time
6
6
7
+
7
8
class TestLighthouse (TestCase ):
8
9
def test_join_timeout_behavior (self ) -> None :
9
10
"""Test that join_timeout_ms affects joining behavior"""
@@ -14,7 +15,7 @@ def test_join_timeout_behavior(self) -> None:
14
15
min_replicas = 1 ,
15
16
join_timeout_ms = 100 ,
16
17
)
17
-
18
+
18
19
# Create a manager that tries to join
19
20
try :
20
21
store = dist .TCPStore (
@@ -37,7 +38,7 @@ def test_join_timeout_behavior(self) -> None:
37
38
use_async_quorum = False ,
38
39
lighthouse_addr = lighthouse .address (),
39
40
)
40
-
41
+
41
42
start_time = time .time ()
42
43
manager .start_quorum ()
43
44
time_taken = time .time () - start_time
@@ -46,15 +47,15 @@ def test_join_timeout_behavior(self) -> None:
46
47
finally :
47
48
# Cleanup
48
49
lighthouse .shutdown ()
49
- if ' manager' in locals ():
50
+ if " manager" in locals ():
50
51
manager .shutdown ()
51
-
52
+
52
53
lighthouse = Lighthouse (
53
54
bind = "[::]:0" ,
54
55
min_replicas = 1 ,
55
56
join_timeout_ms = 400 ,
56
57
)
57
-
58
+
58
59
# Create a manager that tries to join
59
60
try :
60
61
store = dist .TCPStore (
@@ -77,7 +78,7 @@ def test_join_timeout_behavior(self) -> None:
77
78
use_async_quorum = False ,
78
79
lighthouse_addr = lighthouse .address (),
79
80
)
80
-
81
+
81
82
start_time = time .time ()
82
83
manager .start_quorum ()
83
84
time_taken = time .time () - start_time
@@ -86,6 +87,5 @@ def test_join_timeout_behavior(self) -> None:
86
87
finally :
87
88
# Cleanup
88
89
lighthouse .shutdown ()
89
- if ' manager' in locals ():
90
+ if " manager" in locals ():
90
91
manager .shutdown ()
91
-
You can’t perform that action at this time.
0 commit comments