File tree Expand file tree Collapse file tree 7 files changed +16
-13
lines changed
Expand file tree Collapse file tree 7 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -633,7 +633,7 @@ def main():
633633 # if all runs have failed
634634 if analysis .best_result [METRIC ] == ERROR_METRIC :
635635 print ("[ERROR TUN-0016] No successful runs found." )
636- sys .exit (1 )
636+ sys .exit (16 )
637637 elif args .mode == "sweep" :
638638 sweep ()
639639
Original file line number Diff line number Diff line change 3535
3636import os
3737
38+ # Accepted RC: success and failed with no valid results.
39+ accepted_rc = [0 , 16 ]
40+
3841
3942class AutoTunerTestUtils :
4043 @staticmethod
Original file line number Diff line number Diff line change 3636import subprocess
3737import os
3838import time
39- from .autotuner_test_utils import AutoTunerTestUtils
39+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
4040
4141from contextlib import contextmanager
4242
@@ -108,7 +108,7 @@ def test_tune_resume(self):
108108 proc = subprocess .run ("ray status" , shell = True )
109109 no_nodes = proc .returncode != 0
110110 proc = subprocess .run ("ray stop" , shell = True )
111- successful = proc .returncode == 0
111+ successful = proc .returncode in accepted_rc
112112
113113 if no_nodes and successful :
114114 break
@@ -117,7 +117,7 @@ def test_tune_resume(self):
117117 # Run the second config to completion
118118 print ("Running the second config" )
119119 proc = subprocess .run (self .commands [1 ], shell = True )
120- successful = proc .returncode == 0
120+ successful = proc .returncode in accepted_rc
121121 self .assertTrue (successful )
122122
123123
Original file line number Diff line number Diff line change 3535import unittest
3636import subprocess
3737import os
38- from .autotuner_test_utils import AutoTunerTestUtils
38+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
3939
4040cur_dir = os .path .dirname (os .path .abspath (__file__ ))
4141orfs_dir = os .path .join (cur_dir , "../../../flow" )
@@ -75,7 +75,7 @@ def make_base(self):
7575 ]
7676 for command in commands :
7777 out = subprocess .run (command , shell = True , check = True )
78- self .assertTrue (out .returncode == 0 )
78+ self .assertTrue (out .returncode in accepted_rc )
7979
8080 def test_algo_eval (self ):
8181 if not (self .platform and self .design ):
@@ -85,7 +85,7 @@ def test_algo_eval(self):
8585 for command in self .commands :
8686 print (command )
8787 out = subprocess .run (command , shell = True , check = True )
88- successful = out .returncode == 0
88+ successful = out .returncode in accepted_rc
8989 self .assertTrue (successful )
9090
9191
Original file line number Diff line number Diff line change 3535import unittest
3636import subprocess
3737import os
38- from .autotuner_test_utils import AutoTunerTestUtils
38+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
3939
4040cur_dir = os .path .dirname (os .path .abspath (__file__ ))
4141
@@ -68,7 +68,7 @@ def test_sample_iteration(self):
6868 for command in self .commands :
6969 print (command )
7070 out = subprocess .run (command , shell = True , check = True )
71- successful = out .returncode == 0
71+ successful = out .returncode in accepted_rc
7272 self .assertTrue (successful )
7373
7474
Original file line number Diff line number Diff line change 3636import subprocess
3737import os
3838import json
39- from .autotuner_test_utils import AutoTunerTestUtils
39+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
4040
4141cur_dir = os .path .dirname (os .path .abspath (__file__ ))
4242
@@ -80,7 +80,7 @@ def test_sweep(self):
8080 if not (self .platform and self .design ):
8181 raise unittest .SkipTest ("Platform and design have to be defined" )
8282 out = subprocess .run (self .command , shell = True , check = True )
83- successful = out .returncode == 0
83+ successful = out .returncode in accepted_rc
8484 self .assertTrue (successful )
8585
8686
Original file line number Diff line number Diff line change 3535import unittest
3636import subprocess
3737import os
38- from .autotuner_test_utils import AutoTunerTestUtils
38+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
3939
4040cur_dir = os .path .dirname (os .path .abspath (__file__ ))
4141
@@ -64,7 +64,7 @@ def test_tune(self):
6464 if not (self .platform and self .design ):
6565 raise unittest .SkipTest ("Platform and design have to be defined" )
6666 out = subprocess .run (self .command , shell = True , check = True )
67- successful = out .returncode == 0
67+ successful = out .returncode in accepted_rc
6868 self .assertTrue (successful )
6969
7070
You can’t perform that action at this time.
0 commit comments