diff --git a/ngraph/python/src/pyopenvino/inference_engine/ie_core.cpp b/ngraph/python/src/pyopenvino/inference_engine/ie_core.cpp index 14bce5848c0938..52d0873db6065b 100644 --- a/ngraph/python/src/pyopenvino/inference_engine/ie_core.cpp +++ b/ngraph/python/src/pyopenvino/inference_engine/ie_core.cpp @@ -179,11 +179,20 @@ void regclass_IECore(py::module m) return parse_parameter(self.GetConfig(device_name, config_name)); }, py::arg("device_name"), py::arg("config_name")); + cls.def("get_metric", [](InferenceEngine::Core& self, + std::string device_name, + std::string metric_name) -> py::handle { + return parse_parameter(self.GetMetric(device_name, metric_name)); + }, py::arg("device_name"), py::arg("metric_name")); + + cls.def("register_plugin", &InferenceEngine::Core::RegisterPlugin, + py::arg("plugin_name"), py::arg("device_name")=py::str()); + + cls.def("register_plugins", &InferenceEngine::Core::RegisterPlugins); + + cls.def("unregister_plugin", &InferenceEngine::Core::UnregisterPlugin, py::arg("device_name")); + cls.def_property_readonly("available_devices", &InferenceEngine::Core::GetAvailableDevices); // cls.def("query_network", ); - // cls.def("register_plugin", ); - // cls.def("register_plugins", ); - // cls.def("unregister_plugin", ); - // cls.def("get_metric", ); } diff --git a/ngraph/python/tests/test_inference_engine/test_core.py b/ngraph/python/tests/test_inference_engine/test_core.py index 18b64c4f2b9ae4..62c6c6f21a8dbd 100644 --- a/ngraph/python/tests/test_inference_engine/test_core.py +++ b/ngraph/python/tests/test_inference_engine/test_core.py @@ -81,8 +81,7 @@ def test_ie_core_class(): request.set_input({'parameter': input_blob}) request.infer() - result = request.get_blob('relu').buffer() - + result = request.get_blob('relu').buffer assert np.allclose(result, expected_output)