OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[PyOV] Test export/import (#26311)
Alicja Miloszewska5807ed468d8c
diff --git a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp b/src/bindings/python/src/pyopenvino/core/compiled_model.cppindex 1cbf33e11a9..d8163ce3a91 100644--- a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp+++ b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp@@ -47,10 +47,12 @@ void regclass_CompiledModel(py::module m) {"export_model",[](ov::CompiledModel& self) {std::stringstream _stream;- self.export_model(_stream);+ {+ py::gil_scoped_release release;+ self.export_model(_stream);+ }return py::bytes(_stream.str());},- py::call_guard<py::gil_scoped_release>(),R"(Exports the compiled model to bytes/output stream.diff --git a/src/bindings/python/tests/test_runtime/test_compiled_model.py b/src/bindings/python/tests/test_runtime/test_compiled_model.pyindex 5516d8430e5..f7e84daf281 100644--- a/src/bindings/python/tests/test_runtime/test_compiled_model.py+++ b/src/bindings/python/tests/test_runtime/test_compiled_model.py@@ -35,10 +35,6 @@ def test_get_runtime_model(device):assert isinstance(runtime_model, Model)- condition=sys.version_info >= (3, 12),- reason="Fails on any Linux platform with Python 3.12. Ticket CVS-133903",-)def test_export_import(device):core = Core()@@ -57,10 +53,6 @@ def test_export_import(device):assert np.argmax(res[new_compiled.outputs[0]]) == 531- condition=sys.version_info >= (3, 12),- reason="Fails on any Linux platform with Python 3.12. Ticket CVS-133903",-)def test_export_import_with_encryption(device):core = Core()