Skip to content

Commit

Permalink
[PyOV] Fix getting of cache_encryption_callbacks propertys
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos committed Jan 23, 2025
1 parent 5469038 commit 27f3535
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bindings/python/src/pyopenvino/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ py::object from_ov_any(const ov::Any& any) {
return py::cast(luid_stream.str());
} else if (any.is<ov::device::PCIInfo>()) {
return py::cast(any.as<ov::device::PCIInfo>());
}
// Check for ov::cache_encryption_callbacks
else if (any.is<ov::EncryptionCallbacks>()) {
ov::EncryptionCallbacks encryption_callbacks = any.as<ov::EncryptionCallbacks>();
PyObject* list = PyList_New(2);
PyList_Append(list, py::cpp_function(encryption_callbacks.encrypt).ptr());
PyList_Append(list, py::cpp_function(encryption_callbacks.decrypt).ptr());
return py::cast<py::object>(list);
// Custom FrontEnd Types
} else if (any.is<ov::frontend::type::List>()) {
return py::cast(any.as<ov::frontend::type::List>());
Expand Down

0 comments on commit 27f3535

Please sign in to comment.