From 8bfb6afd6af37fc7caef0182b7871176b0ff5b9f Mon Sep 17 00:00:00 2001 From: Anastasia Kuporosova Date: Mon, 20 Mar 2023 07:47:06 +0100 Subject: [PATCH] [PyOV] Remove deprecated API (#16361) --- .../src/pyopenvino/graph/passes/manager.cpp | 110 ------------------ 1 file changed, 110 deletions(-) diff --git a/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp b/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp index 814a9974f39..e8ba80d1524 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp @@ -53,114 +53,4 @@ void regclass_passes_Manager(py::module m) { :param transformation: transformation instance. :type transformation: openvino.runtime.passes.PassBase )"); - - manager.def( - "register_pass", - [](ov::pass::Manager& self, const std::string& pass_name) -> void { - Common::utils::deprecation_warning("register_pass(pass_name)", - "", - "Please use register_pass(ConstantFolding()) instead."); - if (pass_name == "ConstantFolding") { - self.register_pass(); - } - }, - py::arg("pass_name"), - R"( - This method is deprecated. Please use m.register_pass(ConstantFolding()) instead. - - Register pass by name from the list of predefined passes. - - :param pass_name: String to set the type of a pass. - :type pass_name: str - )"); - - manager.def( - "register_pass", - [](ov::pass::Manager& self, - const std::string& pass_name, - const FilePaths& file_paths, - const std::string& version) -> void { - Common::utils::deprecation_warning("register_pass(pass_name, output_files, version)", - "", - "Please use register_pass(Serialize(xml, bin, version)) instead."); - if (pass_name == "Serialize") { - self.register_pass(file_paths.first, - file_paths.second, - Common::utils::convert_to_version(version)); - } - }, - py::arg("pass_name"), - py::arg("output_files"), - py::arg("version") = "UNSPECIFIED", - R"( - This method is deprecated. Please use m.register_pass(Serialize(...)) instead. - - Set the type of register pass for pass manager. - - :param pass_name: String to set the type of a pass. - :type pass_name: str - :param output_files: Tuple which contains paths where .xml and .bin files will be saved. - :type output_files: Tuple[str, str] - :param version: Sets the version of the IR which will be generated. - Supported versions are: - - "UNSPECIFIED" (default) : Use the latest or function version - - "IR_V10" : v10 IR - - "IR_V11" : v11 IR - :type version: str - - Examples - ---------- - 1. Default Version - pass_manager = Manager() - pass_manager.register_pass("Serialize", output_files=("example.xml", "example.bin")) - 2. IR version 11 - pass_manager = Manager() - pass_manager.register_pass("Serialize", output_files=("example.xml", "example.bin"), version="IR_V11") - )"); - - manager.def( - "register_pass", - [](ov::pass::Manager& self, - const std::string& pass_name, - const std::string& xml_path, - const std::string& bin_path, - const std::string& version) -> void { - Common::utils::deprecation_warning("register_pass(pass_name, xml_path, bin_path, version", - "", - "Please use register_pass(Serialize(xml, bin, version)) instead."); - if (pass_name == "Serialize") { - self.register_pass(xml_path, bin_path, Common::utils::convert_to_version(version)); - } - }, - py::arg("pass_name"), - py::arg("xml_path"), - py::arg("bin_path"), - py::arg("version") = "UNSPECIFIED", - R"( - This method is deprecated. Please use m.register_pass(Serialize(...)) instead. - - Set the type of register pass for pass manager. - - :param pass_name: String to set the type of a pass. - :type pass_name: str - :param xml_path: Path where *.xml file will be saved. - :type xml_path: str - :param bin_path: Path where *.bin file will be saved. - :type bin_path: str - :param version: Sets the version of the IR which will be generated. - Supported versions are: - - "UNSPECIFIED" (default) : Use the latest or function version - - "IR_V10" : v10 IR - - "IR_V11" : v11 IR - :type version: str - - Examples - ---------- - 1. Default Version - pass_manager = Manager() - pass_manager.register_pass("Serialize", xml_path="example.xml", bin_path="example.bin") - 2. IR version 11 - pass_manager = Manager() - pass_manager.register_pass("Serialize", xml_path="example.xml", bin_path="example.bin", version="IR_V11") - )"); }