File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44import time
55
66from ftlib import BasicFTLib
7- from ftlib .ftlib_status import FTAllReduceStatus
7+ from ftlib .ftlib_status import FTCollectiveStatus
88
99root_dir = os .path .join (os .path .dirname (__file__ ), os .path .pardir )
1010sys .path .insert (0 , os .path .abspath (root_dir ))
@@ -57,15 +57,15 @@ def dummy_update():
5757 continue
5858 else :
5959 res = ftlib .wait_gradients_ready ()
60- if res == FTAllReduceStatus .NO_NEED :
60+ if res == FTCollectiveStatus .NO_NEED :
6161 logging .critical (
6262 "cannot use average_gradient when there is no need"
6363 )
6464 exit (2 )
65- if res == FTAllReduceStatus .SUCCESS :
65+ if res == FTCollectiveStatus .SUCCESS :
6666 logging .info ("average succeed" )
6767 dummy_update ()
68- if res == FTAllReduceStatus .ABORT :
68+ if res == FTCollectiveStatus .ABORT :
6969 logging .info ("average failed, abort" )
7070 continue
7171
You can’t perform that action at this time.
0 commit comments