From c4034018fd6fcb82697e7d50832552136a36e88d Mon Sep 17 00:00:00 2001 From: Anastasia Kuporosova Date: Thu, 7 Mar 2024 08:02:31 +0100 Subject: [PATCH] [PyOV] Cherry-picked convert ExecutionMode enum to any (#23296) --- src/bindings/python/src/pyopenvino/utils/utils.cpp | 2 ++ src/bindings/python/tests/test_runtime/test_core.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/bindings/python/src/pyopenvino/utils/utils.cpp b/src/bindings/python/src/pyopenvino/utils/utils.cpp index 2d94ea21f30..24f85347762 100644 --- a/src/bindings/python/src/pyopenvino/utils/utils.cpp +++ b/src/bindings/python/src/pyopenvino/utils/utils.cpp @@ -363,6 +363,8 @@ ov::Any py_object_to_any(const py::object& py_obj) { return py::cast(py_obj); } else if (py::isinstance(py_obj)) { return py::cast(py_obj); + } else if (py::isinstance(py_obj)) { + return py::cast(py_obj); } else if (py::isinstance(py_obj)) { return py::cast(py_obj); } else if (py::isinstance(py_obj)) { diff --git a/src/bindings/python/tests/test_runtime/test_core.py b/src/bindings/python/tests/test_runtime/test_core.py index 86700ea7804..90cfb2b6ece 100644 --- a/src/bindings/python/tests/test_runtime/test_core.py +++ b/src/bindings/python/tests/test_runtime/test_core.py @@ -112,6 +112,7 @@ def get_model_path(request, tmp_path): @pytest.mark.parametrize("config", [ None, {hints.performance_mode(): hints.PerformanceMode.THROUGHPUT}, + {hints.execution_mode: hints.ExecutionMode.PERFORMANCE}, ]) def test_compact_api(model_type, device_name, config, request): compiled_model = None