From 29ec26a6a830eb228e4e1de0dfd379c57eb1a9a2 Mon Sep 17 00:00:00 2001 From: Emily Chun Date: Wed, 21 Aug 2024 14:13:41 +0900 Subject: [PATCH 1/4] Update test_cli.py --- tests/e2e/cli/test_cli.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/e2e/cli/test_cli.py b/tests/e2e/cli/test_cli.py index bc9f8459074..e859391c175 100644 --- a/tests/e2e/cli/test_cli.py +++ b/tests/e2e/cli/test_cli.py @@ -133,7 +133,6 @@ def test_otx_e2e_cli( assert (latest_dir / "csv").exists() # 3) otx export - fxt_export_list = [] if task in ("visual_prompting", "zero_shot_visual_prompting"): fxt_export_list.append(ExportCase2Test("ONNX", False, "exported_model_decoder.onnx")) fxt_export_list.append(ExportCase2Test("OPENVINO", False, "exported_model_decoder.xml")) From 9bf6cc98b62091046560c963b76a952792f78074 Mon Sep 17 00:00:00 2001 From: Emily Chun Date: Wed, 21 Aug 2024 15:00:59 +0900 Subject: [PATCH 2/4] Update tests/e2e/cli/test_cli.py Co-authored-by: Eunwoo Shin --- tests/e2e/cli/test_cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/cli/test_cli.py b/tests/e2e/cli/test_cli.py index e859391c175..625f04028f1 100644 --- a/tests/e2e/cli/test_cli.py +++ b/tests/e2e/cli/test_cli.py @@ -134,8 +134,10 @@ def test_otx_e2e_cli( # 3) otx export if task in ("visual_prompting", "zero_shot_visual_prompting"): - fxt_export_list.append(ExportCase2Test("ONNX", False, "exported_model_decoder.onnx")) - fxt_export_list.append(ExportCase2Test("OPENVINO", False, "exported_model_decoder.xml")) + fxt_export_list = [ + ExportCase2Test("ONNX", False, "exported_model_decoder.onnx"), + ExportCase2Test("OPENVINO", False, "exported_model_decoder.xml"), + ] elif "anomaly" in task or "keypoint_detection" in task: fxt_export_list.append(ExportCase2Test("ONNX", False, "exported_model.onnx")) fxt_export_list.append(ExportCase2Test("OPENVINO", False, "exported_model.xml")) From 395f13e8f2421facdf151f03089ca821fdedc103 Mon Sep 17 00:00:00 2001 From: Emily Chun Date: Wed, 21 Aug 2024 15:06:40 +0900 Subject: [PATCH 3/4] Update test_cli.py --- tests/e2e/cli/test_cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/cli/test_cli.py b/tests/e2e/cli/test_cli.py index 625f04028f1..1238f019485 100644 --- a/tests/e2e/cli/test_cli.py +++ b/tests/e2e/cli/test_cli.py @@ -139,8 +139,10 @@ def test_otx_e2e_cli( ExportCase2Test("OPENVINO", False, "exported_model_decoder.xml"), ] elif "anomaly" in task or "keypoint_detection" in task: - fxt_export_list.append(ExportCase2Test("ONNX", False, "exported_model.onnx")) - fxt_export_list.append(ExportCase2Test("OPENVINO", False, "exported_model.xml")) + fxt_export_list = [ + ExportCase2Test("ONNX", False, "exported_model.onnx"), + ExportCase2Test("OPENVINO", False, "exported_model.xml"), + ] overrides = fxt_cli_override_command_per_task[task] if "anomaly" in task: From 2594e5841efb6ce238e5e08d94c85e743010ecd7 Mon Sep 17 00:00:00 2001 From: Emily Chun Date: Wed, 21 Aug 2024 15:41:23 +0900 Subject: [PATCH 4/4] Update test_cli.py --- tests/e2e/cli/test_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/cli/test_cli.py b/tests/e2e/cli/test_cli.py index 1238f019485..07ac0daf103 100644 --- a/tests/e2e/cli/test_cli.py +++ b/tests/e2e/cli/test_cli.py @@ -133,12 +133,12 @@ def test_otx_e2e_cli( assert (latest_dir / "csv").exists() # 3) otx export - if task in ("visual_prompting", "zero_shot_visual_prompting"): + if task in (OTXTaskType.VISUAL_PROMPTING, OTXTaskType.ZERO_SHOT_VISUAL_PROMPTING): fxt_export_list = [ ExportCase2Test("ONNX", False, "exported_model_decoder.onnx"), ExportCase2Test("OPENVINO", False, "exported_model_decoder.xml"), ] - elif "anomaly" in task or "keypoint_detection" in task: + elif "ANOMALY" in task or OTXTaskType.KEYPOINT_DETECTION in task: fxt_export_list = [ ExportCase2Test("ONNX", False, "exported_model.onnx"), ExportCase2Test("OPENVINO", False, "exported_model.xml"), @@ -185,7 +185,7 @@ def test_otx_e2e_cli( msg = "There is no OV IR." raise RuntimeError(msg) exported_model_path = str(ov_files[0]) - if task in ("visual_prompting", "zero_shot_visual_prompting"): + if task in (OTXTaskType.VISUAL_PROMPTING, OTXTaskType.ZERO_SHOT_VISUAL_PROMPTING): recipe = str(Path(recipe).parents[0] / "openvino_model.yaml") overrides = fxt_cli_override_command_per_task[task]