diff --git a/tools/AutoTuner/test/smoke_test_sweep.py b/tools/AutoTuner/test/smoke_test_sweep.py index 7a1b013911..e09abff15b 100644 --- a/tools/AutoTuner/test/smoke_test_sweep.py +++ b/tools/AutoTuner/test/smoke_test_sweep.py @@ -4,8 +4,6 @@ import json cur_dir = os.path.dirname(os.path.abspath(__file__)) -src_dir = os.path.join(cur_dir, "../src/autotuner") -os.chdir(src_dir) class BaseSweepSmokeTest(unittest.TestCase): @@ -13,7 +11,9 @@ class BaseSweepSmokeTest(unittest.TestCase): design = "" def setUp(self): - self.config = "distributed-sweep-example.json" + self.config = os.path.abspath( + os.path.join(cur_dir, "../src/autotuner/distributed-sweep-example.json") + ) # make sure this json only has 1 key called "CTS_CLUSTER_SIZE" and 4 possible values with open(self.config) as f: contents = json.load(f) @@ -31,7 +31,7 @@ def setUp(self): self.jobs = 4 if core >= 4 else core self.experiment = f"smoke-test-sweep-{self.platform}" self.command = ( - "python3 distributed.py" + "python3 -m autotuner.distributed" f" --design {self.design}" f" --platform {self.platform}" f" --experiment {self.experiment}" @@ -40,6 +40,7 @@ def setUp(self): f" sweep" ) + @unittest.skip("abstract_method") def test_sweep(self): raise NotImplementedError( "This method needs to be implemented in the derivative classes." diff --git a/tools/AutoTuner/test/smoke_test_tune.py b/tools/AutoTuner/test/smoke_test_tune.py index 0fcdc6419e..b5491133cf 100644 --- a/tools/AutoTuner/test/smoke_test_tune.py +++ b/tools/AutoTuner/test/smoke_test_tune.py @@ -3,8 +3,6 @@ import os cur_dir = os.path.dirname(os.path.abspath(__file__)) -src_dir = os.path.join(cur_dir, "../src/autotuner") -os.chdir(src_dir) class BaseTuneSmokeTest(unittest.TestCase): @@ -18,7 +16,7 @@ def setUp(self): ) self.experiment = f"smoke-test-tune-{self.platform}" self.command = ( - "python3 distributed.py" + "python3 -m autotuner.distributed" f" --design {self.design}" f" --platform {self.platform}" f" --experiment {self.experiment}" @@ -26,6 +24,7 @@ def setUp(self): f" tune --samples 1" ) + @unittest.skip("abstract_method") def test_tune(self): raise NotImplementedError( "This method needs to be implemented in the derivative classes."