From 13a76eba15e80010e7d98ae2a2bcd71c9161c3ed Mon Sep 17 00:00:00 2001 From: Galina Date: Thu, 20 Apr 2023 16:29:16 +0300 Subject: [PATCH 1/2] Add tests for --output parameter for demo --- tests/test_suite/run_test_command.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/test_suite/run_test_command.py b/tests/test_suite/run_test_command.py index 0a2cc301e8d..9cb5bacba44 100644 --- a/tests/test_suite/run_test_command.py +++ b/tests/test_suite/run_test_command.py @@ -323,8 +323,11 @@ def otx_demo_testing(template, root, otx_dir, args): os.path.join(otx_dir, args["--input"]), "--delay", "-1", + "--output", + os.path.join(template_work_dir, "output"), ] check_run(command_line) + assert os.path.exists(os.path.join(template_work_dir, "output")) def otx_demo_openvino_testing(template, root, otx_dir, args): @@ -339,8 +342,11 @@ def otx_demo_openvino_testing(template, root, otx_dir, args): os.path.join(otx_dir, args["--input"]), "--delay", "-1", + "--output", + os.path.join(template_work_dir, "output"), ] check_run(command_line) + assert os.path.exists(os.path.join(template_work_dir, "output")) def otx_deploy_openvino_testing(template, root, otx_dir, args): @@ -394,9 +400,12 @@ def otx_deploy_openvino_testing(template, root, otx_dir, args): "-i", os.path.join(otx_dir, args["--input"]), "--no_show", + "--output", + os.path.join(deployment_dir, "output"), ], cwd=os.path.join(deployment_dir, "python"), ) + assert os.path.exists(os.path.join(deployment_dir, "output")) def otx_eval_deployment_testing(template, root, otx_dir, args, threshold=0.0): @@ -429,18 +438,22 @@ def otx_eval_deployment_testing(template, root, otx_dir, args, threshold=0.0): def otx_demo_deployment_testing(template, root, otx_dir, args): template_work_dir = get_template_dir(template, root) + deployment_dir = f"{template_work_dir}/deployed_{template.model_template_id}" command_line = [ "otx", "demo", template.model_template_path, "--load-weights", - f"{template_work_dir}/deployed_{template.model_template_id}/openvino.zip", + f"{deployment_dir}/openvino.zip", "--input", os.path.join(otx_dir, args["--input"]), "--delay", "-1", + "--output", + os.path.join(deployment_dir, "output"), ] check_run(command_line) + assert os.path.exists(os.path.join(deployment_dir, "output")) def pot_optimize_testing(template, root, otx_dir, args): From e82bf63b6ce2268b6df7bec81d136b505f2d7dfc Mon Sep 17 00:00:00 2001 From: Galina Date: Fri, 21 Apr 2023 16:08:34 +0300 Subject: [PATCH 2/2] Update OTX==1.2 commit in exp code --- otx/api/usecases/exportable_code/demo/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otx/api/usecases/exportable_code/demo/requirements.txt b/otx/api/usecases/exportable_code/demo/requirements.txt index 0432d858559..7c8ea680276 100644 --- a/otx/api/usecases/exportable_code/demo/requirements.txt +++ b/otx/api/usecases/exportable_code/demo/requirements.txt @@ -1,4 +1,4 @@ openvino==2022.3.0 openmodelzoo-modelapi==2022.3.0 -otx @ git+https://github.com/openvinotoolkit/training_extensions/@861157a27b5e65f0cde710ee332d4aa55b2ddf45#egg=otx +otx==1.2.0 numpy>=1.21.0,<=1.23.5 # np.bool was removed in 1.24.0 which was used in openvino runtime