From eb67c27a9f4453c70339caee30ae192c4188329e Mon Sep 17 00:00:00 2001 From: Jack Luar Date: Thu, 31 Oct 2024 18:34:13 +0000 Subject: [PATCH] add ensure ray stop before starting any tests Signed-off-by: Jack Luar --- tools/AutoTuner/test/ref_file_check.py | 1 + tools/AutoTuner/test/smoke_test_algo_eval.py | 1 + tools/AutoTuner/test/smoke_test_sample_iteration.py | 1 + tools/AutoTuner/test/smoke_test_sweep.py | 1 + tools/AutoTuner/test/smoke_test_tune.py | 1 + 5 files changed, 5 insertions(+) diff --git a/tools/AutoTuner/test/ref_file_check.py b/tools/AutoTuner/test/ref_file_check.py index e0401693c4..e9d144d1ab 100644 --- a/tools/AutoTuner/test/ref_file_check.py +++ b/tools/AutoTuner/test/ref_file_check.py @@ -26,6 +26,7 @@ def setUp(self): f" tune --samples 1" for c in configs ] + subprocess.run(["ray", "stop"], shell=True, check=True) # Make this a test case def test_files(self): diff --git a/tools/AutoTuner/test/smoke_test_algo_eval.py b/tools/AutoTuner/test/smoke_test_algo_eval.py index a695489b48..72a7aebf2a 100644 --- a/tools/AutoTuner/test/smoke_test_algo_eval.py +++ b/tools/AutoTuner/test/smoke_test_algo_eval.py @@ -32,6 +32,7 @@ def setUp(self): f" --reference {self.reference}" for a, e in self.matrix ] + subprocess.run(["ray", "stop"], shell=True, check=True) def make_base(self): os.chdir(orfs_dir) diff --git a/tools/AutoTuner/test/smoke_test_sample_iteration.py b/tools/AutoTuner/test/smoke_test_sample_iteration.py index f49c22a088..013e1e224c 100644 --- a/tools/AutoTuner/test/smoke_test_sample_iteration.py +++ b/tools/AutoTuner/test/smoke_test_sample_iteration.py @@ -27,6 +27,7 @@ def setUp(self): f" tune --samples {s} --iterations {i}" for s, i in self.matrix ] + subprocess.run(["ray", "stop"], shell=True, check=True) class ASAP7SampleIterationSmokeTest(BaseSampleIterationSmokeTest): diff --git a/tools/AutoTuner/test/smoke_test_sweep.py b/tools/AutoTuner/test/smoke_test_sweep.py index 7a1b013911..6540778b18 100644 --- a/tools/AutoTuner/test/smoke_test_sweep.py +++ b/tools/AutoTuner/test/smoke_test_sweep.py @@ -39,6 +39,7 @@ def setUp(self): f" --jobs {self.jobs}" f" sweep" ) + subprocess.run(["ray", "stop"], shell=True, check=True) def test_sweep(self): raise NotImplementedError( diff --git a/tools/AutoTuner/test/smoke_test_tune.py b/tools/AutoTuner/test/smoke_test_tune.py index 9710416745..bf9bf172b1 100644 --- a/tools/AutoTuner/test/smoke_test_tune.py +++ b/tools/AutoTuner/test/smoke_test_tune.py @@ -25,6 +25,7 @@ def setUp(self): f" --config {self.config}" f" tune --samples 5" ) + subprocess.run(["ray", "stop"], shell=True, check=True) def test_tune(self): raise NotImplementedError(