[Python API] Remove get/set_config methods from the PyOV (#10587)
This commit is contained in:
parent
435584bb91
commit
5bb8f77c3f
@ -149,15 +149,6 @@ void regclass_CompiledModel(py::module m) {
|
|||||||
:rtype: None
|
:rtype: None
|
||||||
)");
|
)");
|
||||||
|
|
||||||
// todo: remove after Accuracy Checker migration to set/get_property API
|
|
||||||
cls.def(
|
|
||||||
"get_config",
|
|
||||||
[](ov::CompiledModel& self, const std::string& name) -> py::object {
|
|
||||||
PyErr_WarnEx(PyExc_DeprecationWarning, "get_config() is deprecated, use get_property() instead.", 1);
|
|
||||||
return Common::from_ov_any(self.get_property(name)).as<py::object>();
|
|
||||||
},
|
|
||||||
py::arg("name"));
|
|
||||||
|
|
||||||
cls.def(
|
cls.def(
|
||||||
"get_property",
|
"get_property",
|
||||||
[](ov::CompiledModel& self, const std::string& name) -> py::object {
|
[](ov::CompiledModel& self, const std::string& name) -> py::object {
|
||||||
@ -172,15 +163,6 @@ void regclass_CompiledModel(py::module m) {
|
|||||||
:rtype: Any
|
:rtype: Any
|
||||||
)");
|
)");
|
||||||
|
|
||||||
// todo: remove after Accuracy Checker migration to set/get_property API
|
|
||||||
cls.def(
|
|
||||||
"get_metric",
|
|
||||||
[](ov::CompiledModel& self, const std::string& name) -> py::object {
|
|
||||||
PyErr_WarnEx(PyExc_DeprecationWarning, "get_metric() is deprecated, use get_property() instead.", 1);
|
|
||||||
return Common::from_ov_any(self.get_property(name)).as<py::object>();
|
|
||||||
},
|
|
||||||
py::arg("name"));
|
|
||||||
|
|
||||||
cls.def("get_runtime_model",
|
cls.def("get_runtime_model",
|
||||||
&ov::CompiledModel::get_runtime_model,
|
&ov::CompiledModel::get_runtime_model,
|
||||||
R"(
|
R"(
|
||||||
|
@ -32,19 +32,6 @@ void regclass_Core(py::module m) {
|
|||||||
|
|
||||||
cls.def(py::init<const std::string&>(), py::arg("xml_config_file") = "");
|
cls.def(py::init<const std::string&>(), py::arg("xml_config_file") = "");
|
||||||
|
|
||||||
// todo: remove after Accuracy Checker migration to set/get_property API
|
|
||||||
cls.def(
|
|
||||||
"set_config",
|
|
||||||
[](ov::Core& self, const std::map<std::string, std::string>& config, const std::string& device_name) {
|
|
||||||
PyErr_WarnEx(PyExc_DeprecationWarning, "set_config() is deprecated, use set_property() instead.", 1);
|
|
||||||
self.set_property(device_name, {config.begin(), config.end()});
|
|
||||||
},
|
|
||||||
py::arg("device_name") = "",
|
|
||||||
py::arg("properties"),
|
|
||||||
R"(
|
|
||||||
Sets properties for the device.
|
|
||||||
)");
|
|
||||||
|
|
||||||
cls.def(
|
cls.def(
|
||||||
"set_property",
|
"set_property",
|
||||||
[](ov::Core& self, const std::map<std::string, py::object>& properties) {
|
[](ov::Core& self, const std::map<std::string, py::object>& properties) {
|
||||||
@ -369,16 +356,6 @@ void regclass_Core(py::module m) {
|
|||||||
new_compiled = core.import_model(user_stream, "CPU")
|
new_compiled = core.import_model(user_stream, "CPU")
|
||||||
)");
|
)");
|
||||||
|
|
||||||
// todo: remove after Accuracy Checker migration to set/get_property API
|
|
||||||
cls.def(
|
|
||||||
"get_config",
|
|
||||||
[](ov::Core& self, const std::string& device_name, const std::string& name) -> py::object {
|
|
||||||
PyErr_WarnEx(PyExc_DeprecationWarning, "get_config() is deprecated, use get_property() instead.", 1);
|
|
||||||
return Common::from_ov_any(self.get_property(device_name, name)).as<py::object>();
|
|
||||||
},
|
|
||||||
py::arg("device_name"),
|
|
||||||
py::arg("name"));
|
|
||||||
|
|
||||||
cls.def(
|
cls.def(
|
||||||
"get_property",
|
"get_property",
|
||||||
[](ov::Core& self, const std::string& device_name, const std::string& name) -> py::object {
|
[](ov::Core& self, const std::string& device_name, const std::string& name) -> py::object {
|
||||||
@ -397,16 +374,6 @@ void regclass_Core(py::module m) {
|
|||||||
:rtype: object
|
:rtype: object
|
||||||
)");
|
)");
|
||||||
|
|
||||||
// todo: remove after Accuracy Checker migration to set/get_property API
|
|
||||||
cls.def(
|
|
||||||
"get_metric",
|
|
||||||
[](ov::Core& self, const std::string device_name, const std::string name) -> py::object {
|
|
||||||
PyErr_WarnEx(PyExc_DeprecationWarning, "get_metric() is deprecated, use get_property() instead.", 1);
|
|
||||||
return Common::from_ov_any(self.get_property(device_name, name)).as<py::object>();
|
|
||||||
},
|
|
||||||
py::arg("device_name"),
|
|
||||||
py::arg("name"));
|
|
||||||
|
|
||||||
cls.def("register_plugin",
|
cls.def("register_plugin",
|
||||||
&ov::Core::register_plugin,
|
&ov::Core::register_plugin,
|
||||||
py::arg("plugin_name"),
|
py::arg("plugin_name"),
|
||||||
|
Loading…
Reference in New Issue
Block a user