From 2e43b376f5bb3bab8edee5d3f1beea541d1cd3b8 Mon Sep 17 00:00:00 2001 From: Yingda Chen Date: Tue, 26 Jul 2022 13:17:29 +0800 Subject: [PATCH] [to #42322933]disable image segmentation test temporarily --- tests/pipelines/test_image_instance_segmentation.py | 4 ++-- tests/trainers/test_image_instance_segmentation_trainer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/pipelines/test_image_instance_segmentation.py b/tests/pipelines/test_image_instance_segmentation.py index 37b92266..f41d3f49 100644 --- a/tests/pipelines/test_image_instance_segmentation.py +++ b/tests/pipelines/test_image_instance_segmentation.py @@ -18,7 +18,7 @@ class ImageInstanceSegmentationTest(unittest.TestCase): model_id = 'damo/cv_swin-b_image-instance-segmentation_coco' image = 'data/test/images/image_instance_segmentation.jpg' - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skipUnless(test_level() >= 2, 'skip test in current test level') def test_run_with_model_from_modelhub(self): model = Model.from_pretrained(self.model_id) config_path = os.path.join(model.model_dir, ModelFile.CONFIGURATION) @@ -30,7 +30,7 @@ class ImageInstanceSegmentationTest(unittest.TestCase): preprocessor=preprocessor) print(pipeline_ins(input=self.image)[OutputKeys.LABELS]) - @unittest.skipUnless(test_level() >= 1, 'skip test in current test level') + @unittest.skipUnless(test_level() >= 2, 'skip test in current test level') def test_run_with_model_name(self): pipeline_ins = pipeline( task=Tasks.image_segmentation, model=self.model_id) diff --git a/tests/trainers/test_image_instance_segmentation_trainer.py b/tests/trainers/test_image_instance_segmentation_trainer.py index fb9eb3c4..07c24976 100644 --- a/tests/trainers/test_image_instance_segmentation_trainer.py +++ b/tests/trainers/test_image_instance_segmentation_trainer.py @@ -71,7 +71,7 @@ class TestImageInstanceSegmentationTrainer(unittest.TestCase): shutil.rmtree(self.tmp_dir) super().tearDown() - @unittest.skipUnless(test_level() >= 0, 'skip test in current test level') + @unittest.skipUnless(test_level() >= 2, 'skip test in current test level') def test_trainer(self): kwargs = dict( model=self.model_id,