diff --git a/src/bindings/python/src/openvino/_ov_api.py b/src/bindings/python/src/openvino/_ov_api.py index f1b69fb86fcbc0..6b1d99cbb96e29 100644 --- a/src/bindings/python/src/openvino/_ov_api.py +++ b/src/bindings/python/src/openvino/_ov_api.py @@ -63,13 +63,13 @@ def clone(self) -> "Model": return Model(self.__model.clone()) def __copy__(self) -> "Model": - raise TypeError("Cannot copy 'openvino.runtime.Model'. Please, use deepcopy instead.") + raise TypeError("Cannot copy 'openvino.Model'. Please, use deepcopy instead.") def __deepcopy__(self, memo: Dict) -> "Model": """Returns a deepcopy of Model. :return: A copy of Model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model """ return Model(self.__model.clone()) @@ -108,14 +108,14 @@ def infer( (1) `int` (2) `str` - (3) `openvino.runtime.ConstOutput` + (3) `openvino.ConstOutput` The allowed types of values in the `inputs` are: (1) `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor` - (2) `openvino.runtime.Tensor` + (2) `openvino.Tensor` - Can be called with only one `openvino.runtime.Tensor` or `numpy.ndarray`, + Can be called with only one `openvino.Tensor` or `numpy.ndarray`, it will work only with one-input models. When model has more inputs, function throws error. @@ -190,14 +190,14 @@ def start_async( (1) `int` (2) `str` - (3) `openvino.runtime.ConstOutput` + (3) `openvino.ConstOutput` The allowed types of values in the `inputs` are: (1) `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor` - (2) `openvino.runtime.Tensor` + (2) `openvino.Tensor` - Can be called with only one `openvino.runtime.Tensor` or `numpy.ndarray`, + Can be called with only one `openvino.Tensor` or `numpy.ndarray`, it will work only with one-input models. When model has more inputs, function throws error. @@ -241,7 +241,7 @@ def get_compiled_model(self) -> "CompiledModel": """Gets the compiled model this InferRequest is using. :return: a CompiledModel object - :rtype: openvino.runtime.ie_api.CompiledModel + :rtype: openvino.CompiledModel """ return CompiledModel(super().get_compiled_model()) @@ -250,7 +250,7 @@ def results(self) -> OVDict: """Gets all outputs tensors of this InferRequest. :return: Dictionary of results from output tensors with ports as keys. - :rtype: Dict[openvino.runtime.ConstOutput, numpy.array] + :rtype: Dict[openvino.ConstOutput, numpy.array] """ return OVDict(super().results) @@ -277,7 +277,7 @@ def create_infer_request(self) -> InferRequest: The created request has allocated input and output tensors. :return: New InferRequest object. - :rtype: openvino.runtime.InferRequest + :rtype: openvino.InferRequest """ return InferRequest(super().create_infer_request()) @@ -285,7 +285,7 @@ def query_state(self) -> None: """Gets state control interface for the underlaying infer request. :return: List of VariableState objects. - :rtype: List[openvino.runtime.VariableState] + :rtype: List[openvino.VariableState] """ if self._infer_request is None: self._infer_request = self.create_infer_request() @@ -316,14 +316,14 @@ def infer_new_request(self, inputs: Any = None) -> OVDict: (1) `int` (2) `str` - (3) `openvino.runtime.ConstOutput` + (3) `openvino.ConstOutput` The allowed types of values in the `inputs` are: (1) `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor` - (2) `openvino.runtime.Tensor` + (2) `openvino.Tensor` - Can be called with only one `openvino.runtime.Tensor` or `numpy.ndarray`, + Can be called with only one `openvino.Tensor` or `numpy.ndarray`, it will work only with one-input models. When model has more inputs, function throws error. @@ -361,14 +361,14 @@ def __call__( (1) `int` (2) `str` - (3) `openvino.runtime.ConstOutput` + (3) `openvino.ConstOutput` The allowed types of values in the `inputs` are: (1) `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor` - (2) `openvino.runtime.Tensor` + (2) `openvino.Tensor` - Can be called with only one `openvino.runtime.Tensor` or `numpy.ndarray`, + Can be called with only one `openvino.Tensor` or `numpy.ndarray`, it will work only with one-input models. When model has more inputs, function throws error. @@ -448,7 +448,7 @@ def __iter__(self) -> Iterable[InferRequest]: will put the parent AsyncInferQueue object in an invalid state. :return: a generator that yields InferRequests. - :rtype: Iterable[openvino.runtime.InferRequest] + :rtype: Iterable[openvino.InferRequest] """ return (InferRequest(x) for x in super().__iter__()) @@ -462,7 +462,7 @@ def __getitem__(self, i: int) -> InferRequest: :param i: InferRequest id. :type i: int :return: InferRequests from the pool with given id. - :rtype: openvino.runtime.InferRequest + :rtype: openvino.InferRequest """ return InferRequest(super().__getitem__(i)) @@ -478,14 +478,14 @@ def start_async( (1) `int` (2) `str` - (3) `openvino.runtime.ConstOutput` + (3) `openvino.ConstOutput` The allowed types of values in the `inputs` are: (1) `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor` - (2) `openvino.runtime.Tensor` + (2) `openvino.Tensor` - Can be called with only one `openvino.runtime.Tensor` or `numpy.ndarray`, + Can be called with only one `openvino.Tensor` or `numpy.ndarray`, it will work only with one-input models. When model has more inputs, function throws error. @@ -574,7 +574,7 @@ def compile_model( :param model: Model acquired from read_model function or a path to a model in IR / ONNX / PDPD / TF and TFLite format. - :type model: Union[openvino.runtime.Model, str, pathlib.Path] + :type model: Union[openvino.Model, str, pathlib.Path] :param device_name: Optional. Name of the device to load the model to. If not specified, the default OpenVINO device will be selected by AUTO plugin. :type device_name: str @@ -584,7 +584,7 @@ def compile_model( :param weights: Optional. Weights of model in memory to be loaded to the model. :type weights: bytes, optional, keyword-only :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel """ if isinstance(model, Model): model = model._Model__model @@ -635,7 +635,7 @@ def import_model( (property name, property value) relevant only for this load operation. :type config: dict, optional :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel :Example: @@ -680,7 +680,7 @@ def compile_model( :param model: Model acquired from read_model function or a path to a model in IR / ONNX / PDPD / TF and TFLite format. - :type model: Union[openvino.runtime.Model, str, pathlib.Path] + :type model: Union[openvino.Model, str, pathlib.Path] :param device_name: Optional. Name of the device to load the model to. If not specified, the default OpenVINO device will be selected by AUTO plugin. :type device_name: str @@ -688,7 +688,7 @@ def compile_model( (property name, property value) relevant only for this load operation. :type config: dict, optional :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel """ core = Core() diff --git a/src/bindings/python/src/openvino/helpers/packing.py b/src/bindings/python/src/openvino/helpers/packing.py index 0d72f47b5f1746..cf085e3eca2a5b 100644 --- a/src/bindings/python/src/openvino/helpers/packing.py +++ b/src/bindings/python/src/openvino/helpers/packing.py @@ -21,7 +21,7 @@ def pack_data(array: np.ndarray, type: Type) -> np.ndarray: :param array: numpy array with values to pack. :type array: numpy array :param type: Type to interpret the array values. Type must be u1, u4, i4, nf4 or f4e2m1. - :type type: openvino.runtime.Type + :type type: openvino.Type """ assert type in [Type.u1, Type.u4, Type.i4, Type.nf4, Type.f4e2m1], "Packing algorithm for the" "data types stored in 1, 2 or 4 bits" @@ -58,9 +58,9 @@ def unpack_data(array: np.ndarray, type: Type, shape: Union[list, Shape]) -> np. :param array: numpy array to unpack. :type array: numpy array :param type: Type to extract from array values. Type must be u1, u4, i4, nf4 or f4e2m1. - :type type: openvino.runtime.Type + :type type: openvino.Type :param shape: the new shape for the unpacked array. - :type shape: Union[list, openvino.runtime.Shape] + :type shape: Union[list, openvino.Shape] """ assert type in [Type.u1, Type.u4, Type.i4, Type.nf4, Type.f4e2m1], "Unpacking algorithm for the" "data types stored in 1, 2 or 4 bits" unpacked = np.unpackbits(array.view(np.uint8)) diff --git a/src/bindings/python/src/openvino/utils/data_helpers/wrappers.py b/src/bindings/python/src/openvino/utils/data_helpers/wrappers.py index 903ae2c6ad3888..02c6cfa473d21d 100644 --- a/src/bindings/python/src/openvino/utils/data_helpers/wrappers.py +++ b/src/bindings/python/src/openvino/utils/data_helpers/wrappers.py @@ -36,7 +36,7 @@ class OVDict(Mapping): This class is a dict-like object. It provides possibility to address data tensors with three key types: - * `openvino.runtime.ConstOutput` - port of the output + * `openvino.ConstOutput` - port of the output * `int` - index of the output * `str` - names of the output diff --git a/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp b/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp index 0a579a557d6b9d..2894e07f1d5d77 100644 --- a/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp +++ b/src/bindings/python/src/pyopenvino/core/async_infer_queue.cpp @@ -166,7 +166,7 @@ class AsyncInferQueue { void regclass_AsyncInferQueue(py::module m) { py::class_> cls(m, "AsyncInferQueue"); - cls.doc() = "openvino.runtime.AsyncInferQueue represents a helper that creates a pool of asynchronous" + cls.doc() = "openvino.AsyncInferQueue represents a helper that creates a pool of asynchronous" "InferRequests and provides synchronization functions to control flow of a simple pipeline."; cls.def(py::init(), @@ -176,11 +176,11 @@ void regclass_AsyncInferQueue(py::module m) { Creates AsyncInferQueue. :param model: Model to be used to create InferRequests in a pool. - :type model: openvino.runtime.CompiledModel + :type model: openvino.CompiledModel :param jobs: Number of InferRequests objects in a pool. If 0, jobs number will be set automatically to the optimal number. Default: 0 :type jobs: int - :rtype: openvino.runtime.AsyncInferQueue + :rtype: openvino.AsyncInferQueue )"); // Overload for single input, it will throw error if a model has more than one input. @@ -216,7 +216,7 @@ void regclass_AsyncInferQueue(py::module m) { :param inputs: Data to set on single input tensor of next available InferRequest from AsyncInferQueue's pool. - :type inputs: openvino.runtime.Tensor + :type inputs: openvino.Tensor :param userdata: Any data that will be passed to a callback :type userdata: Any :rtype: None @@ -262,7 +262,7 @@ void regclass_AsyncInferQueue(py::module m) { :param inputs: Data to set on input tensors of next available InferRequest from AsyncInferQueue's pool. - :type inputs: dict[Union[int, str, openvino.runtime.ConstOutput] : openvino.runtime.Tensor] + :type inputs: dict[Union[int, str, openvino.ConstOutput] : openvino.Tensor] :param userdata: Any data that will be passed to a callback :rtype: None @@ -348,7 +348,7 @@ void regclass_AsyncInferQueue(py::module m) { :param i: InferRequest id :type i: int :return: InferRequests from the pool with given id. - :rtype: openvino.runtime.InferRequest + :rtype: openvino.InferRequest )"); cls.def_property_readonly( diff --git a/src/bindings/python/src/pyopenvino/core/common.cpp b/src/bindings/python/src/pyopenvino/core/common.cpp index e98d4398cf2b8c..bf730f3ae89eb6 100644 --- a/src/bindings/python/src/pyopenvino/core/common.cpp +++ b/src/bindings/python/src/pyopenvino/core/common.cpp @@ -578,7 +578,7 @@ ov::PartialShape partial_shape_from_list(const py::list& shape) { } else { throw py::type_error("Incorrect type " + std::string(py::str(dim.get_type())) + " for dimension. Expected types are: " - "int, str, openvino.runtime.Dimension, list/tuple with lower and upper values for " + "int, str, openvino.Dimension, list/tuple with lower and upper values for " "dynamic dimension."); } } diff --git a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp index 3395f628b1b303..b7c12c4310f1f2 100644 --- a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp +++ b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp @@ -16,7 +16,7 @@ namespace py = pybind11; void regclass_CompiledModel(py::module m) { py::class_> cls(m, "CompiledModel"); - cls.doc() = "openvino.runtime.CompiledModel represents Model that is compiled for a specific device by applying " + cls.doc() = "openvino.CompiledModel represents Model that is compiled for a specific device by applying " "multiple optimization transformations, then mapping to compute kernels."; cls.def(py::init([](ov::CompiledModel& other) { @@ -40,7 +40,7 @@ void regclass_CompiledModel(py::module m) { The created request has allocated input and output tensors. :return: New InferRequest object. - :rtype: openvino.runtime.InferRequest + :rtype: openvino.InferRequest )"); cls.def( @@ -174,7 +174,7 @@ void regclass_CompiledModel(py::module m) { is optimized and which kernels, element types, and layouts are selected. :return: Model, containing Executable Graph information. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); cls.def("release_memory", @@ -193,7 +193,7 @@ void regclass_CompiledModel(py::module m) { Gets all inputs of a compiled model. :return: Inputs of a compiled model. - :rtype: List[openvino.runtime.ConstOutput] + :rtype: List[openvino.ConstOutput] )"); cls.def("input", @@ -203,7 +203,7 @@ void regclass_CompiledModel(py::module m) { If a model has more than one input, this method throws an exception. :return: A compiled model input. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def("input", @@ -216,7 +216,7 @@ void regclass_CompiledModel(py::module m) { :param index: An input index. :type index: int :return: A compiled model input. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def( @@ -230,7 +230,7 @@ void regclass_CompiledModel(py::module m) { :param tensor_name: An input tensor name. :type tensor_name: str :return: A compiled model input. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def_property_readonly("outputs", @@ -239,7 +239,7 @@ void regclass_CompiledModel(py::module m) { Gets all outputs of a compiled model. :return: Outputs of a compiled model. - :rtype: List[openvino.runtime.ConstOutput] + :rtype: List[openvino.ConstOutput] )"); cls.def("output", @@ -249,7 +249,7 @@ void regclass_CompiledModel(py::module m) { If the model has more than one output, this method throws an exception. :return: A compiled model output. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def("output", @@ -262,7 +262,7 @@ void regclass_CompiledModel(py::module m) { :param index: An output index. :type index: int :return: A compiled model output. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def("output", @@ -276,7 +276,7 @@ void regclass_CompiledModel(py::module m) { :param tensor_name: An output tensor name. :type tensor_name: str :return: A compiled model output. - :rtype: openvino.runtime.ConstOutput + :rtype: openvino.ConstOutput )"); cls.def("__repr__", [](const ov::CompiledModel& self) { diff --git a/src/bindings/python/src/pyopenvino/core/core.cpp b/src/bindings/python/src/pyopenvino/core/core.cpp index 526ebb02952782..778ca6a9874de2 100644 --- a/src/bindings/python/src/pyopenvino/core/core.cpp +++ b/src/bindings/python/src/pyopenvino/core/core.cpp @@ -22,7 +22,7 @@ namespace py = pybind11; void regclass_Core(py::module m) { py::class_> cls(m, "Core"); cls.doc() = - "openvino.runtime.Core class represents OpenVINO runtime Core entity. User applications can create several " + "openvino.Core class represents OpenVINO runtime Core entity. User applications can create several " "Core class instances, but in this case, the underlying plugins are created multiple times and not shared " "between several Core instances. The recommended way is to have a single Core instance per application."; @@ -144,13 +144,13 @@ void regclass_Core(py::module m) { GIL is released while running this function. :param model: Model acquired from read_model function. - :type model: openvino.runtime.Model + :type model: openvino.Model :param device_name: Name of the device which will load the model. :type device_name: str :param properties: Optional dict of pairs: (property name, property value) relevant only for this load operation. :type properties: dict :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def( @@ -172,11 +172,11 @@ void regclass_Core(py::module m) { GIL is released while running this function. :param model: Model acquired from read_model function. - :type model: openvino.runtime.Model + :type model: openvino.Model :param properties: Optional dict of pairs: (property name, property value) relevant only for this load operation. :type properties: dict :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def( @@ -207,7 +207,7 @@ void regclass_Core(py::module m) { :param properties: Optional dict of pairs: (property name, property value) relevant only for this load operation. :type properties: dict :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def( @@ -258,7 +258,7 @@ void regclass_Core(py::module m) { :param properties: Optional dict of pairs: (property name, property value) relevant only for this load operation. :type properties: dict :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def( @@ -283,7 +283,7 @@ void regclass_Core(py::module m) { :param properties: Optional dict of pairs: (property name, property value) relevant only for this load operation. :type properties: dict :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def( @@ -358,7 +358,7 @@ void regclass_Core(py::module m) { :param device_name: Device name to identify a plugin. :type device_name: str :return: Plugin version information. - :rtype: Dict[str, openvino.runtime.Version] + :rtype: Dict[str, openvino.Version] )"); cls.def( @@ -389,7 +389,7 @@ void regclass_Core(py::module m) { :param weights: Bytes with tensor's data. :type weights: bytes :return: A model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); cls.def( @@ -423,7 +423,7 @@ void regclass_Core(py::module m) { :param config: Optional map of pairs: (property name, property value) relevant only for this read operation. :type config: dict, optional :return: A model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); cls.def( @@ -441,9 +441,9 @@ void regclass_Core(py::module m) { :type model: str :param weights: Tensor with weights. Reading ONNX / PDPD / TF and TFLite models doesn't support loading weights from weights tensors. - :type weights: openvino.runtime.Tensor + :type weights: openvino.Tensor :return: A model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); cls.def( @@ -510,7 +510,7 @@ void regclass_Core(py::module m) { :param config: Optional map of pairs: (property name, property value) relevant only for this read operation. :type config: dict, optional :return: A model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); cls.def( @@ -561,7 +561,7 @@ void regclass_Core(py::module m) { :param properties: Optional map of pairs: (property name, property value) relevant only for this load operation. :type properties: dict, optional :return: A compiled model. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel :Example: .. code-block:: python @@ -664,7 +664,7 @@ void regclass_Core(py::module m) { GIL is released while running this function. :param model: Model object to query. - :type model: openvino.runtime.Model + :type model: openvino.Model :param device_name: A name of a device to query. :type device_name: str :param properties: Optional dict of pairs: (property name, property value) @@ -690,7 +690,7 @@ void regclass_Core(py::module m) { Registers an extension to a Core object. :param extension: Extension object. - :type extension: openvino.runtime.Extension + :type extension: openvino.Extension )"); cls.def( @@ -701,7 +701,7 @@ void regclass_Core(py::module m) { Registers extensions to a Core object. :param extensions: List of Extension objects. - :type extensions: list[openvino.runtime.Extension] + :type extensions: list[openvino.Extension] )"); cls.def( diff --git a/src/bindings/python/src/pyopenvino/core/extension.cpp b/src/bindings/python/src/pyopenvino/core/extension.cpp index ac8869fca1f47a..d9c1f4a2a11554 100644 --- a/src/bindings/python/src/pyopenvino/core/extension.cpp +++ b/src/bindings/python/src/pyopenvino/core/extension.cpp @@ -16,7 +16,7 @@ namespace py = pybind11; void regclass_Extension(py::module m) { py::class_> ext(m, "Extension", py::dynamic_attr()); - ext.doc() = "openvino.runtime.Extension provides the base interface for OpenVINO extensions."; + ext.doc() = "openvino.Extension provides the base interface for OpenVINO extensions."; ext.def("__repr__", [](const ov::Extension& self) { return Common::get_simple_repr(self); diff --git a/src/bindings/python/src/pyopenvino/core/infer_request.cpp b/src/bindings/python/src/pyopenvino/core/infer_request.cpp index 23ae154473e45f..4405fbd62c9b75 100644 --- a/src/bindings/python/src/pyopenvino/core/infer_request.cpp +++ b/src/bindings/python/src/pyopenvino/core/infer_request.cpp @@ -27,7 +27,7 @@ inline py::object run_sync_infer(InferRequestWrapper& self, bool share_outputs, void regclass_InferRequest(py::module m) { py::class_> cls(m, "InferRequest"); - cls.doc() = "openvino.runtime.InferRequest represents infer request which can be run in asynchronous or " + cls.doc() = "openvino.InferRequest represents infer request which can be run in asynchronous or " "synchronous manners."; cls.def(py::init([](InferRequestWrapper& other) { @@ -46,7 +46,7 @@ void regclass_InferRequest(py::module m) { Set tensors using given keys. :param inputs: Data to set on tensors. - :type inputs: Dict[Union[int, str, openvino.runtime.ConstOutput], openvino.runtime.Tensor] + :type inputs: Dict[Union[int, str, openvino.ConstOutput], openvino.Tensor] )"); cls.def( @@ -68,7 +68,7 @@ void regclass_InferRequest(py::module m) { :param tensors: Input tensors for batched infer request. The type of each tensor must match the model input element type and shape (except batch dimension). Total size of tensors needs to match with input's size. - :type tensors: List[openvino.runtime.Tensor] + :type tensors: List[openvino.Tensor] )"); cls.def( @@ -87,11 +87,11 @@ void regclass_InferRequest(py::module m) { :param port: Port of input tensor. - :type port: openvino.runtime.ConstOutput + :type port: openvino.ConstOutput :param tensors: Input tensors for batched infer request. The type of each tensor must match the model input element type and shape (except batch dimension). Total size of tensors needs to match with input's size. - :type tensors: List[openvino.runtime.Tensor] + :type tensors: List[openvino.Tensor] :rtype: None )"); @@ -109,7 +109,7 @@ void regclass_InferRequest(py::module m) { Set output tensors using given indexes. :param inputs: Data to set on output tensors. - :type inputs: Dict[int, openvino.runtime.Tensor] + :type inputs: Dict[int, openvino.Tensor] )"); // Python API exclusive function @@ -126,7 +126,7 @@ void regclass_InferRequest(py::module m) { Set input tensors using given indexes. :param inputs: Data to set on output tensors. - :type inputs: Dict[int, openvino.runtime.Tensor] + :type inputs: Dict[int, openvino.Tensor] )"); cls.def( @@ -143,7 +143,7 @@ void regclass_InferRequest(py::module m) { :param tensors: Input tensors for batched infer request. The type of each tensor must match the model input element type and shape (except batch dimension). Total size of tensors needs to match with input's size. - :type tensors: List[openvino.runtime.Tensor] + :type tensors: List[openvino.Tensor] )"); cls.def( @@ -183,9 +183,9 @@ void regclass_InferRequest(py::module m) { GIL is released while running the inference. :param inputs: Data to set on single input tensor. - :type inputs: openvino.runtime.Tensor + :type inputs: openvino.Tensor :return: Dictionary of results from output tensors with ports as keys. - :rtype: Dict[openvino.runtime.ConstOutput, numpy.array] + :rtype: Dict[openvino.ConstOutput, numpy.array] )"); // Overload for general case, it accepts dict of inputs that are pairs of (key, value). @@ -213,9 +213,9 @@ void regclass_InferRequest(py::module m) { GIL is released while running the inference. :param inputs: Data to set on input tensors. - :type inputs: Dict[Union[int, str, openvino.runtime.ConstOutput], openvino.runtime.Tensor] + :type inputs: Dict[Union[int, str, openvino.ConstOutput], openvino.Tensor] :return: Dictionary of results from output tensors with ports as keys. - :rtype: Dict[openvino.runtime.ConstOutput, numpy.array] + :rtype: Dict[openvino.ConstOutput, numpy.array] )"); // Overload for single input, it will throw error if a model has more than one input. @@ -247,7 +247,7 @@ void regclass_InferRequest(py::module m) { running will lead to throwing exceptions. :param inputs: Data to set on single input tensors. - :type inputs: openvino.runtime.Tensor + :type inputs: openvino.Tensor :param userdata: Any data that will be passed inside callback call. :type userdata: Any )"); @@ -286,7 +286,7 @@ void regclass_InferRequest(py::module m) { running will lead to throwing exceptions. :param inputs: Data to set on input tensors. - :type inputs: Dict[Union[int, str, openvino.runtime.ConstOutput], openvino.runtime.Tensor] + :type inputs: Dict[Union[int, str, openvino.ConstOutput], openvino.Tensor] :param userdata: Any data that will be passed inside callback call. :type userdata: Any )"); @@ -379,7 +379,7 @@ void regclass_InferRequest(py::module m) { :param name: Name of tensor to get. :type name: str :return: A Tensor object with given name. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -392,9 +392,9 @@ void regclass_InferRequest(py::module m) { Gets input/output tensor of InferRequest. :param port: Port of tensor to get. - :type port: openvino.runtime.ConstOutput + :type port: openvino.ConstOutput :return: A Tensor object for the port. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -407,9 +407,9 @@ void regclass_InferRequest(py::module m) { Gets input/output tensor of InferRequest. :param port: Port of tensor to get. - :type port: openvino.runtime.Output + :type port: openvino.Output :return: A Tensor object for the port. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -426,7 +426,7 @@ void regclass_InferRequest(py::module m) { :return: An input Tensor with index idx for the model. If a tensor with specified idx is not found, an exception is thrown. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -439,7 +439,7 @@ void regclass_InferRequest(py::module m) { :return: An input Tensor for the model. If model has several inputs, an exception is thrown. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -455,7 +455,7 @@ void regclass_InferRequest(py::module m) { :type idx: int :return: An output Tensor with index idx for the model. If a tensor with specified idx is not found, an exception is thrown. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -468,7 +468,7 @@ void regclass_InferRequest(py::module m) { :return: An output Tensor for the model. If model has several outputs, an exception is thrown. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); cls.def( @@ -485,7 +485,7 @@ void regclass_InferRequest(py::module m) { :type name: str :param tensor: RemoteTensor object. The element_type and shape of a tensor must match the model's input/output element_type and shape. - :type tensor: openvino.runtime.RemoteTensor + :type tensor: openvino.RemoteTensor )"); cls.def( @@ -502,7 +502,7 @@ void regclass_InferRequest(py::module m) { :type name: str :param tensor: Tensor object. The element_type and shape of a tensor must match the model's input/output element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -516,10 +516,10 @@ void regclass_InferRequest(py::module m) { Sets input/output tensor of InferRequest. :param port: Port of input/output tensor. - :type port: openvino.runtime.ConstOutput + :type port: openvino.ConstOutput :param tensor: Tensor object. The element_type and shape of a tensor must match the model's input/output element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -533,10 +533,10 @@ void regclass_InferRequest(py::module m) { Sets input/output tensor of InferRequest. :param port: Port of input/output tensor. - :type port: openvino.runtime.Output + :type port: openvino.Output :param tensor: Tensor object. The element_type and shape of a tensor must match the model's input/output element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -554,7 +554,7 @@ void regclass_InferRequest(py::module m) { :type idx: int :param tensor: Tensor object. The element_type and shape of a tensor must match the model's input element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -569,7 +569,7 @@ void regclass_InferRequest(py::module m) { :param tensor: Tensor object. The element_type and shape of a tensor must match the model's input element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -586,7 +586,7 @@ void regclass_InferRequest(py::module m) { :type idx: int :param tensor: Tensor object. The element_type and shape of a tensor must match the model's output element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -601,7 +601,7 @@ void regclass_InferRequest(py::module m) { :param tensor: Tensor object. The element_type and shape of a tensor must match the model's output element_type and shape. - :type tensor: openvino.runtime.Tensor + :type tensor: openvino.Tensor )"); cls.def( @@ -618,7 +618,7 @@ void regclass_InferRequest(py::module m) { GIL is released while running this function. :return: List of profiling information for operations in model. - :rtype: List[openvino.runtime.ProfilingInfo] + :rtype: List[openvino.ProfilingInfo] )"); cls.def( @@ -633,7 +633,7 @@ void regclass_InferRequest(py::module m) { GIL is released while running this function. :return: List of VariableState objects. - :rtype: List[openvino.runtime.VariableState] + :rtype: List[openvino.VariableState] )"); cls.def( @@ -655,7 +655,7 @@ void regclass_InferRequest(py::module m) { Returns the compiled model. :return: Compiled model object. - :rtype: openvino.runtime.CompiledModel + :rtype: openvino.CompiledModel )"); cls.def_property_readonly( @@ -677,7 +677,7 @@ void regclass_InferRequest(py::module m) { R"( Gets all inputs of a compiled model which was used to create this InferRequest. - :rtype: List[openvino.runtime.ConstOutput] + :rtype: List[openvino.ConstOutput] )"); cls.def_property_readonly( @@ -688,7 +688,7 @@ void regclass_InferRequest(py::module m) { R"( Gets all outputs of a compiled model which was used to create this InferRequest. - :rtype: List[openvino.runtime.ConstOutput] + :rtype: List[openvino.ConstOutput] )"); cls.def_property_readonly("input_tensors", @@ -696,7 +696,7 @@ void regclass_InferRequest(py::module m) { R"( Gets all input tensors of this InferRequest. - :rtype: List[openvino.runtime.Tensor] + :rtype: List[openvino.Tensor] )"); cls.def_property_readonly("output_tensors", @@ -705,7 +705,7 @@ void regclass_InferRequest(py::module m) { Gets all output tensors of this InferRequest. - :rtype: List[openvino.runtime.Tensor] + :rtype: List[openvino.Tensor] )"); cls.def_property_readonly( @@ -732,7 +732,7 @@ void regclass_InferRequest(py::module m) { GIL is released while running this function. :return: Inference time. - :rtype: List[openvino.runtime.ProfilingInfo] + :rtype: List[openvino.ProfilingInfo] )"); cls.def_property_readonly( @@ -746,7 +746,7 @@ void regclass_InferRequest(py::module m) { Note: All string-based data is decoded by default. :return: Dictionary of results from output tensors with ports as keys. - :rtype: Dict[openvino.runtime.ConstOutput, numpy.array] + :rtype: Dict[openvino.ConstOutput, numpy.array] )"); cls.def("__repr__", [](const InferRequestWrapper& self) { diff --git a/src/bindings/python/src/pyopenvino/core/profiling_info.cpp b/src/bindings/python/src/pyopenvino/core/profiling_info.cpp index 8912559ee0da80..2f8f3fb44a3493 100644 --- a/src/bindings/python/src/pyopenvino/core/profiling_info.cpp +++ b/src/bindings/python/src/pyopenvino/core/profiling_info.cpp @@ -13,7 +13,7 @@ namespace py = pybind11; void regclass_ProfilingInfo(py::module m) { py::class_> cls(m, "ProfilingInfo"); - cls.doc() = "openvino.runtime.ProfilingInfo contains performance metrics for single node."; + cls.doc() = "openvino.ProfilingInfo contains performance metrics for single node."; cls.def("__repr__", [](const ov::ProfilingInfo& self) { return Common::get_simple_repr(self); diff --git a/src/bindings/python/src/pyopenvino/core/remote_tensor.cpp b/src/bindings/python/src/pyopenvino/core/remote_tensor.cpp index c0e2a16c5ecbf6..249e5bd604982d 100644 --- a/src/bindings/python/src/pyopenvino/core/remote_tensor.cpp +++ b/src/bindings/python/src/pyopenvino/core/remote_tensor.cpp @@ -26,9 +26,9 @@ void regclass_RemoteTensor(py::module m) { :param remote_tensor: The RemoteTensor object on which the RoiRemoteTensor will be based. :type remote_tensor: openvino.RemoteTensor :param begin: The starting coordinates for the tensor bound. - :type begin: openvino.runtime.Coordinate + :type begin: openvino.Coordinate :param end: The ending coordinates for the tensor bound. - :type end: openvino.runtime.Coordinate + :type end: openvino.Coordinate )"); cls.def( diff --git a/src/bindings/python/src/pyopenvino/core/tensor.cpp b/src/bindings/python/src/pyopenvino/core/tensor.cpp index 0e8873e412958e..0ed8e753469e7a 100644 --- a/src/bindings/python/src/pyopenvino/core/tensor.cpp +++ b/src/bindings/python/src/pyopenvino/core/tensor.cpp @@ -16,7 +16,7 @@ namespace py = pybind11; void regclass_Tensor(py::module m) { py::class_> cls(m, "Tensor"); - cls.doc() = "openvino.runtime.Tensor holding either copy of memory or shared host memory."; + cls.doc() = "openvino.Tensor holding either copy of memory or shared host memory."; cls.def(py::init([](py::array& array, bool shared_memory) { return Common::object_from_data(array, shared_memory); @@ -52,19 +52,19 @@ void regclass_Tensor(py::module m) { memory with the specific openvino element type parameter. :param array: C_CONTIGUOUS numpy array which will be wrapped in - openvino.runtime.Tensor with given parameters (shape + openvino.Tensor with given parameters (shape and element_type). Array's memory is being shared with a host. Any action performed on the host memory will be reflected on this Tensor's memory! :type array: numpy.array :param shape: Shape of the new tensor. - :type shape: openvino.runtime.Shape + :type shape: openvino.Shape :param type: Element type - :type type: openvino.runtime.Type + :type type: openvino.Type :Example: .. code-block:: python - import openvino.runtime as ov + import openvino as ov import numpy as np arr = np.array(shape=(100), dtype=np.uint8) @@ -86,19 +86,19 @@ void regclass_Tensor(py::module m) { memory with the specific openvino element type parameter. :param array: C_CONTIGUOUS numpy array which will be wrapped in - openvino.runtime.Tensor with given parameters (shape + openvino.Tensor with given parameters (shape and element_type). Array's memory is being shared with a host. Any action performed on the host memory will be reflected on this Tensor's memory! :type array: numpy.array :param shape: Shape of the new tensor. :type shape: list or tuple :param type: Element type. - :type type: openvino.runtime.Type + :type type: openvino.Type :Example: .. code-block:: python - import openvino.runtime as ov + import openvino as ov import numpy as np arr = np.array(shape=(100), dtype=np.uint8) @@ -158,7 +158,7 @@ void regclass_Tensor(py::module m) { Type and shape will be taken from the port. :param port: Output port from a node. - :type param: openvino.runtime.Output + :type param: openvino.Output )"); cls.def(py::init([](ov::Output& port, py::array& array) { @@ -172,9 +172,9 @@ void regclass_Tensor(py::module m) { Type and shape will be taken from the port. :param port: Output port from a node. - :type param: openvino.runtime.Output + :type param: openvino.Output :param array: C_CONTIGUOUS numpy array which will be wrapped in - openvino.runtime.Tensor. Array's memory is being shared wi a host. + openvino.Tensor. Array's memory is being shared wi a host. Any action performed on the host memory will be reflected on this Tensor's memory! :type array: numpy.array )"); @@ -186,7 +186,7 @@ void regclass_Tensor(py::module m) { Type and shape will be taken from the port. :param port: Output port from a node. - :type param: openvino.runtime.ConstOutput + :type param: openvino.ConstOutput )"); cls.def(py::init([](const ov::Output& port, py::array& array) { @@ -200,9 +200,9 @@ void regclass_Tensor(py::module m) { Type and shape will be taken from the port. :param port: Output port from a node. - :type param: openvino.runtime.ConstOutput + :type param: openvino.ConstOutput :param array: C_CONTIGUOUS numpy array which will be wrapped in - openvino.runtime.Tensor. Array's memory is being shared with a host. + openvino.Tensor. Array's memory is being shared with a host. Any action performed on the host memory will be reflected on this Tensor's memory! :type array: numpy.array )"); @@ -219,7 +219,7 @@ void regclass_Tensor(py::module m) { R"( Gets Tensor's element type. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); cls.def_property_readonly("element_type", @@ -227,7 +227,7 @@ void regclass_Tensor(py::module m) { R"( Tensor's element type. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); cls.def("get_size", @@ -267,7 +267,7 @@ void regclass_Tensor(py::module m) { R"( Gets Tensor's strides in bytes. - :rtype: openvino.runtime.Strides + :rtype: openvino.Strides )"); cls.def_property_readonly("strides", @@ -275,7 +275,7 @@ void regclass_Tensor(py::module m) { R"( Tensor's strides in bytes. - :rtype: openvino.runtime.Strides + :rtype: openvino.Strides )"); cls.def_property_readonly( @@ -361,7 +361,7 @@ void regclass_Tensor(py::module m) { R"( Gets Tensor's shape. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); cls.def("set_shape", diff --git a/src/bindings/python/src/pyopenvino/core/variable_state.cpp b/src/bindings/python/src/pyopenvino/core/variable_state.cpp index 7e4f96f0fcc999..008222f2fe8855 100644 --- a/src/bindings/python/src/pyopenvino/core/variable_state.cpp +++ b/src/bindings/python/src/pyopenvino/core/variable_state.cpp @@ -13,7 +13,7 @@ namespace py = pybind11; void regclass_VariableState(py::module m) { py::class_> variable_st(m, "VariableState"); - variable_st.doc() = "openvino.runtime.VariableState class."; + variable_st.doc() = "openvino.VariableState class."; variable_st.def("__repr__", [](const ov::VariableState& self) { return Common::get_simple_repr(self); diff --git a/src/bindings/python/src/pyopenvino/core/version.cpp b/src/bindings/python/src/pyopenvino/core/version.cpp index 2e17d7fd85e525..a60b4f1bdffc41 100644 --- a/src/bindings/python/src/pyopenvino/core/version.cpp +++ b/src/bindings/python/src/pyopenvino/core/version.cpp @@ -13,8 +13,7 @@ namespace py = pybind11; void regclass_Version(py::module m) { py::class_ cls(m, "Version"); - cls.doc() = - "openvino.runtime.Version represents version information that describes plugins and the OpenVINO library."; + cls.doc() = "openvino.Version represents version information that describes plugins and the OpenVINO library."; cls.def("__repr__", [](const ov::Version& self) { return "<" + Common::get_class_name(self) + ": " + std::string(self.buildNumber) + " " + self.description + ">"; diff --git a/src/bindings/python/src/pyopenvino/experimental/experimental.cpp b/src/bindings/python/src/pyopenvino/experimental/experimental.cpp index fffc1f92fb908a..d3de09e3d2fbd2 100644 --- a/src/bindings/python/src/pyopenvino/experimental/experimental.cpp +++ b/src/bindings/python/src/pyopenvino/experimental/experimental.cpp @@ -23,7 +23,7 @@ void regmodule_experimental(py::module m) { using Dimension(min, max) for each element. :param output: Node output pointing to the tensor for estimation. - :type output: openvino.runtime.Output + :type output: openvino.Output :param partial_shape: The resulting estimation will be stored in this PartialShape. :type partial_shape: openvino.PartialShape :return: True if estimation evaluation was successful, false otherwise. @@ -37,7 +37,7 @@ void regmodule_experimental(py::module m) { It traverses the graph upwards to deduce the estimation. :param output: Node output pointing to the tensor for estimation. - :type output: openvino.runtime.Output + :type output: openvino.Output :return: Tensors representing the lower and upper bound value estimations. :rtype: Tuple[openvino.Tensor, openvino.Tensor] )"); diff --git a/src/bindings/python/src/pyopenvino/frontend/frontend.cpp b/src/bindings/python/src/pyopenvino/frontend/frontend.cpp index 19f5287a590bbe..daede38a5579e1 100644 --- a/src/bindings/python/src/pyopenvino/frontend/frontend.cpp +++ b/src/bindings/python/src/pyopenvino/frontend/frontend.cpp @@ -110,7 +110,7 @@ void regclass_frontend_FrontEnd(py::module m) { :param model: Input model. :type model: openvino.frontend.InputModel :return: Fully converted OpenVINO Model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); fem.def( @@ -125,7 +125,7 @@ void regclass_frontend_FrontEnd(py::module m) { :param model: Partially converted OpenVINO model. :type model: openvino.frontend.Model :return: Fully converted OpenVINO Model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); fem.def("convert_partially", @@ -139,7 +139,7 @@ void regclass_frontend_FrontEnd(py::module m) { :param model : Input model. :type model: openvino.frontend.InputModel :return: Partially converted OpenVINO Model. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); fem.def("decode", @@ -153,7 +153,7 @@ void regclass_frontend_FrontEnd(py::module m) { :param model : Input model. :type model: openvino.frontend.InputModel :return: OpenVINO Model after decoding. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); fem.def( @@ -166,7 +166,7 @@ void regclass_frontend_FrontEnd(py::module m) { Runs normalization passes on function that was loaded with partial conversion. :param model : Partially converted OpenVINO model. - :type model: openvino.runtime.Model + :type model: openvino.Model )"); fem.def("get_name", diff --git a/src/bindings/python/src/pyopenvino/frontend/input_model.cpp b/src/bindings/python/src/pyopenvino/frontend/input_model.cpp index 455f03a2b2bcb9..4140a097a28ae9 100644 --- a/src/bindings/python/src/pyopenvino/frontend/input_model.cpp +++ b/src/bindings/python/src/pyopenvino/frontend/input_model.cpp @@ -225,7 +225,7 @@ void regclass_frontend_InputModel(py::module m) { :param place: Model place. :type place: openvino.frontend.Place :param shape: Partial shape for this place. - :type shape: openvino.runtime.PartialShape + :type shape: openvino.PartialShape )"); im.def("get_partial_shape", @@ -237,7 +237,7 @@ void regclass_frontend_InputModel(py::module m) { :param place: Model place. :type place: openvino.frontend.Place :return: Partial shape for this place. - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); im.def("get_inputs", @@ -303,7 +303,7 @@ void regclass_frontend_InputModel(py::module m) { :param place: Model place. :type place: openvino.frontend.Place :param type: New element type. - :type type: openvino.runtime.Type + :type type: openvino.Type )"); im.def("get_element_type", @@ -315,7 +315,7 @@ void regclass_frontend_InputModel(py::module m) { :param place: Model place. :type place: openvino.frontend.Place :return: Element type for this place. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); im.def( diff --git a/src/bindings/python/src/pyopenvino/graph/any.cpp b/src/bindings/python/src/pyopenvino/graph/any.cpp index 7e2c2ba3b2681e..5e1689ddffe279 100644 --- a/src/bindings/python/src/pyopenvino/graph/any.cpp +++ b/src/bindings/python/src/pyopenvino/graph/any.cpp @@ -22,7 +22,7 @@ bool check_key(py::object key, py::object obj) { void regclass_graph_Any(py::module m) { py::class_> ov_any(m, "OVAny"); - ov_any.doc() = "openvino.runtime.OVAny provides object wrapper for OpenVINO" + ov_any.doc() = "openvino.OVAny provides object wrapper for OpenVINO" "ov::Any class. It allows to pass different types of objects" "into C++ based core of the project."; diff --git a/src/bindings/python/src/pyopenvino/graph/attribute_visitor.cpp b/src/bindings/python/src/pyopenvino/graph/attribute_visitor.cpp index d07dcd235f738d..82699434d80633 100644 --- a/src/bindings/python/src/pyopenvino/graph/attribute_visitor.cpp +++ b/src/bindings/python/src/pyopenvino/graph/attribute_visitor.cpp @@ -35,7 +35,7 @@ void regclass_graph_AttributeVisitor(py::module m) { "on_attributes", [](ov::AttributeVisitor* self, py::dict& attributes) { py::object float_32_type = py::module_::import("numpy").attr("float32"); - py::object model = py::module_::import("openvino.runtime").attr("Model"); + py::object model = py::module_::import("openvino").attr("Model"); for (const auto& attribute : attributes) { if (py::isinstance(attribute.second)) { visit_attribute(attributes, attribute, self); diff --git a/src/bindings/python/src/pyopenvino/graph/axis_set.cpp b/src/bindings/python/src/pyopenvino/graph/axis_set.cpp index 2ec3cd565588b6..c5e527bec45add 100644 --- a/src/bindings/python/src/pyopenvino/graph/axis_set.cpp +++ b/src/bindings/python/src/pyopenvino/graph/axis_set.cpp @@ -18,7 +18,7 @@ namespace py = pybind11; void regclass_graph_AxisSet(py::module m) { py::class_> axis_set(m, "AxisSet"); - axis_set.doc() = "openvino.runtime.AxisSet wraps ov::AxisSet"; + axis_set.doc() = "openvino.AxisSet wraps ov::AxisSet"; axis_set.def(py::init&>(), py::arg("axes")); axis_set.def(py::init&>(), py::arg("axes")); axis_set.def(py::init&>(), py::arg("axes")); diff --git a/src/bindings/python/src/pyopenvino/graph/axis_vector.cpp b/src/bindings/python/src/pyopenvino/graph/axis_vector.cpp index a42978400f5874..325e8583fa3147 100644 --- a/src/bindings/python/src/pyopenvino/graph/axis_vector.cpp +++ b/src/bindings/python/src/pyopenvino/graph/axis_vector.cpp @@ -14,7 +14,7 @@ namespace py = pybind11; void regclass_graph_AxisVector(py::module m) { py::class_> axis_vector(m, "AxisVector"); - axis_vector.doc() = "openvino.runtime.AxisVector wraps ov::AxisVector"; + axis_vector.doc() = "openvino.AxisVector wraps ov::AxisVector"; axis_vector.def(py::init&>(), py::arg("axes")); axis_vector.def(py::init&>(), py::arg("axes")); axis_vector.def(py::init(), py::arg("axes")); diff --git a/src/bindings/python/src/pyopenvino/graph/coordinate.cpp b/src/bindings/python/src/pyopenvino/graph/coordinate.cpp index ad28454db8d7c0..fa86259b2e497b 100644 --- a/src/bindings/python/src/pyopenvino/graph/coordinate.cpp +++ b/src/bindings/python/src/pyopenvino/graph/coordinate.cpp @@ -14,7 +14,7 @@ namespace py = pybind11; void regclass_graph_Coordinate(py::module m) { py::class_> coordinate(m, "Coordinate"); - coordinate.doc() = "openvino.runtime.Coordinate wraps ov::Coordinate"; + coordinate.doc() = "openvino.Coordinate wraps ov::Coordinate"; coordinate.def(py::init&>()); coordinate.def(py::init()); coordinate.def(py::init&>()); diff --git a/src/bindings/python/src/pyopenvino/graph/coordinate_diff.cpp b/src/bindings/python/src/pyopenvino/graph/coordinate_diff.cpp index 0309144a29c4f2..d251ca82874672 100644 --- a/src/bindings/python/src/pyopenvino/graph/coordinate_diff.cpp +++ b/src/bindings/python/src/pyopenvino/graph/coordinate_diff.cpp @@ -18,7 +18,7 @@ namespace py = pybind11; void regclass_graph_CoordinateDiff(py::module m) { py::class_> coordinate_diff(m, "CoordinateDiff"); - coordinate_diff.doc() = "openvino.runtime.CoordinateDiff wraps ov::CoordinateDiff"; + coordinate_diff.doc() = "openvino.CoordinateDiff wraps ov::CoordinateDiff"; coordinate_diff.def(py::init&>()); coordinate_diff.def(py::init&>()); coordinate_diff.def(py::init()); diff --git a/src/bindings/python/src/pyopenvino/graph/descriptors/tensor.cpp b/src/bindings/python/src/pyopenvino/graph/descriptors/tensor.cpp index 903f10c3e96656..4ad656baa481fc 100644 --- a/src/bindings/python/src/pyopenvino/graph/descriptors/tensor.cpp +++ b/src/bindings/python/src/pyopenvino/graph/descriptors/tensor.cpp @@ -29,7 +29,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the shape description. :return: The shape description. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); tensor.def("get_rt_info", @@ -39,7 +39,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns PyRTMap which is a dictionary of user defined runtime info. :return: A dictionary of user defined data. - :rtype: openvino.runtime.RTMap + :rtype: openvino.RTMap )"); tensor.def("size", @@ -57,7 +57,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the partial shape description. :return: PartialShape description. - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); tensor.def("get_element_type", @@ -66,7 +66,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the element type description. :return: Type description. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); tensor.def("get_names", @@ -113,7 +113,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the lower bound of the tensor. :return: Lower bound. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); tensor.def("set_lower_value", @@ -123,7 +123,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Sets the lower bound of the tensor. :param lower_bound: The lower bound value. - :type lower_bound: openvino.runtime.Tensor + :type lower_bound: openvino.Tensor )"); tensor.def("get_upper_value", @@ -132,7 +132,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the upper bound of the tensor. :return: Upper bound. - :rtype: openvino.runtime.Tensor + :rtype: openvino.Tensor )"); tensor.def("set_upper_value", @@ -142,7 +142,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Sets the upper bound of the tensor. :param upper_bound: Sets the upper bound value. - :type upper_bound: openvino.runtime.Tensor + :type upper_bound: openvino.Tensor )"); tensor.def("get_value_symbol", @@ -151,7 +151,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Returns the List of symbols. :return: List of Symbols. - :rtype: List[openvino.runtime.Symbol] + :rtype: List[openvino.Symbol] )"); tensor.def("set_value_symbol", @@ -161,7 +161,7 @@ void regclass_graph_descriptor_Tensor(py::module m) { Sets the value symbol of the tensor. :param value_symbol: List of Symbols - :type value_symbol: List[openvino.runtime.Symbol] + :type value_symbol: List[openvino.Symbol] )"); tensor.def_property_readonly("shape", &ov::descriptor::Tensor::get_shape); diff --git a/src/bindings/python/src/pyopenvino/graph/dimension.cpp b/src/bindings/python/src/pyopenvino/graph/dimension.cpp index 4c2a67c60108fd..e74dc6878ac92b 100644 --- a/src/bindings/python/src/pyopenvino/graph/dimension.cpp +++ b/src/bindings/python/src/pyopenvino/graph/dimension.cpp @@ -20,7 +20,7 @@ void regclass_graph_Dimension(py::module m) { using value_type = ov::Dimension::value_type; py::class_> dim(m, "Dimension"); - dim.doc() = "openvino.runtime.Dimension wraps ov::Dimension"; + dim.doc() = "openvino.Dimension wraps ov::Dimension"; dim.def(py::init<>()); dim.def(py::init(), py::arg("dimension"), diff --git a/src/bindings/python/src/pyopenvino/graph/discrete_type_info.cpp b/src/bindings/python/src/pyopenvino/graph/discrete_type_info.cpp index 6cd4586fa4a2ae..60f5d21c26a73a 100644 --- a/src/bindings/python/src/pyopenvino/graph/discrete_type_info.cpp +++ b/src/bindings/python/src/pyopenvino/graph/discrete_type_info.cpp @@ -15,7 +15,7 @@ namespace py = pybind11; void regclass_graph_DiscreteTypeInfo(py::module m) { py::class_> discrete_type_info(m, "DiscreteTypeInfo"); - discrete_type_info.doc() = "openvino.runtime.DiscreteTypeInfo wraps ov::DiscreteTypeInfo"; + discrete_type_info.doc() = "openvino.DiscreteTypeInfo wraps ov::DiscreteTypeInfo"; discrete_type_info.def(py::init([](const std::string& name, const std::string& version_id) { return std::make_shared(name, version_id); diff --git a/src/bindings/python/src/pyopenvino/graph/layout.cpp b/src/bindings/python/src/pyopenvino/graph/layout.cpp index 0c35df12caa2b9..18f6ffcbcc70ea 100644 --- a/src/bindings/python/src/pyopenvino/graph/layout.cpp +++ b/src/bindings/python/src/pyopenvino/graph/layout.cpp @@ -14,7 +14,7 @@ namespace py = pybind11; void regclass_graph_Layout(py::module m) { py::class_> layout(m, "Layout"); - layout.doc() = "openvino.runtime.Layout wraps ov::Layout"; + layout.doc() = "openvino.Layout wraps ov::Layout"; layout.def(py::init<>()); layout.def(py::init(), py::arg("layout_str")); diff --git a/src/bindings/python/src/pyopenvino/graph/layout_helpers.cpp b/src/bindings/python/src/pyopenvino/graph/layout_helpers.cpp index 2622ee7e8d2c2e..c3c00f4a0c852f 100644 --- a/src/bindings/python/src/pyopenvino/graph/layout_helpers.cpp +++ b/src/bindings/python/src/pyopenvino/graph/layout_helpers.cpp @@ -11,7 +11,7 @@ namespace py = pybind11; void regmodule_graph_layout_helpers(py::module m) { - py::module mod = m.def_submodule("layout_helpers", "openvino.runtime.layout_helpers"); + py::module mod = m.def_submodule("layout_helpers", "openvino.layout_helpers"); mod.def("has_batch", &ov::layout::has_batch, py::arg("layout")); mod.def("batch_idx", &ov::layout::batch_idx, py::arg("layout")); diff --git a/src/bindings/python/src/pyopenvino/graph/model.cpp b/src/bindings/python/src/pyopenvino/graph/model.cpp index 30be517281d671..337eca6ee9aadd 100644 --- a/src/bindings/python/src/pyopenvino/graph/model.cpp +++ b/src/bindings/python/src/pyopenvino/graph/model.cpp @@ -104,7 +104,7 @@ static ov::Output output_from_handle(ov::Model& model, const py::handl return handle.cast>(); } else { throw py::type_error("Incorrect key type " + std::string(py::str(handle.get_type())) + - " to reshape a model, expected keys as openvino.runtime.Output, int or str."); + " to reshape a model, expected keys as openvino.Output, int or str."); } } @@ -116,9 +116,8 @@ static ov::PartialShape partial_shape_from_handle(const py::handle& handle) { } else if (py::isinstance(handle)) { return ov::PartialShape(handle.cast()); } else { - throw py::type_error( - "Incorrect value type " + std::string(py::str(handle.get_type())) + - " to reshape a model, expected values as openvino.runtime.PartialShape, str, list or tuple."); + throw py::type_error("Incorrect value type " + std::string(py::str(handle.get_type())) + + " to reshape a model, expected values as openvino.PartialShape, str, list or tuple."); } } @@ -153,7 +152,7 @@ static int64_t find_sink_position(const ov::SinkVector& sinks, const std::shared void regclass_graph_Model(py::module m) { py::class_> model(m, "Model", py::module_local()); - model.doc() = "openvino.runtime.Model wraps ov::Model"; + model.doc() = "openvino.Model wraps ov::Model"; model.def(py::init([](const std::shared_ptr& other) { return other; @@ -180,7 +179,7 @@ void regclass_graph_Model(py::module m) { :param results: List of results. :type results: List[op.Result] :param sinks: List of Nodes to be used as Sinks (e.g. Assign ops). - :type sinks: List[openvino.runtime.Node] + :type sinks: List[openvino.Node] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -200,7 +199,7 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model. :param results: List of Nodes to be used as results. - :type results: List[openvino.runtime.Node] + :type results: List[openvino.Node] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -220,7 +219,7 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model. :param result: Node to be used as result. - :type result: openvino.runtime.Node + :type result: openvino.Node :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -239,7 +238,7 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of outputs. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -264,9 +263,9 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of outputs. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param sinks: List of Nodes to be used as Sinks (e.g. Assign ops). - :type sinks: List[openvino.runtime.Node] + :type sinks: List[openvino.Node] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -291,9 +290,9 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of outputs. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param sinks: List of Output sink node handles. - :type sinks: List[openvino.runtime.Output] + :type sinks: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -318,9 +317,9 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of outputs. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param sinks: List of Output sink node handles. - :type sinks: List[openvino.runtime.Output] + :type sinks: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param variables: List of variables. @@ -349,7 +348,7 @@ void regclass_graph_Model(py::module m) { :param results: List of results. :type results: List[op.Result] :param sinks: List of Output sink node handles. - :type sinks: List[openvino.runtime.Output] + :type sinks: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -376,7 +375,7 @@ void regclass_graph_Model(py::module m) { :param results: List of results. :type results: List[op.Result] :param sinks: List of Output sink node handles. - :type sinks: List[openvino.runtime.Output] + :type sinks: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param variables: List of variables. @@ -405,7 +404,7 @@ void regclass_graph_Model(py::module m) { :param results: List of results. :type results: List[op.Result] :param sinks: List of Nodes to be used as Sinks (e.g. Assign ops). - :type sinks: List[openvino.runtime.Node] + :type sinks: List[openvino.Node] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param variables: List of variables. @@ -432,9 +431,9 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of results. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param sinks: List of Nodes to be used as Sinks (e.g. Assign ops). - :type sinks: List[openvino.runtime.Node] + :type sinks: List[openvino.Node] :param variables: List of variables. :type variables: List[op.util.Variable] :param name: String to set as model's friendly name. @@ -480,7 +479,7 @@ void regclass_graph_Model(py::module m) { Create user-defined Model which is a representation of a model :param results: List of results. - :type results: List[openvino.runtime.Output] + :type results: List[openvino.Output] :param parameters: List of parameters. :type parameters: List[op.Parameter] :param name: String to set as model's friendly name. @@ -504,10 +503,10 @@ void regclass_graph_Model(py::module m) { The allowed types of keys in the `variables_shapes` dictionary is `str`. The allowed types of values in the `variables_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -515,7 +514,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds (4) - `openvino.runtime.Dimension` (5) `str` using next syntax: + `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 '1..10' - to define bounded dimension @@ -524,7 +523,7 @@ void regclass_graph_Model(py::module m) { GIL is released while running this function. :param partial_shape: New shape. - :type partial_shape: openvino.runtime.PartialShape + :type partial_shape: openvino.PartialShape :param variables_shapes: New shapes for variables :type variables_shapes: Dict[keys, values] :return : void @@ -546,10 +545,10 @@ void regclass_graph_Model(py::module m) { The allowed types of keys in the `variables_shapes` dictionary is `str`. The allowed types of values in the `variables_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -557,7 +556,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds (4) - `openvino.runtime.Dimension` (5) `str` using next syntax: + `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 '1..10' - to define bounded dimension @@ -588,10 +587,10 @@ void regclass_graph_Model(py::module m) { The allowed types of keys in the `variables_shapes` dictionary is `str`. The allowed types of values in the `variables_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -599,7 +598,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds (4) - `openvino.runtime.Dimension` (5) `str` using next syntax: + `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 '1..10' - to define bounded dimension @@ -629,10 +628,10 @@ void regclass_graph_Model(py::module m) { The allowed types of keys in the `variables_shapes` dictionary is `str`. The allowed types of values in the `variables_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -640,7 +639,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds (4) - `openvino.runtime.Dimension` (5) `str` using next syntax: + `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 '1..10' - to define bounded dimension @@ -677,14 +676,14 @@ void regclass_graph_Model(py::module m) { (1) `int`, input index (2) `str`, input tensor name - (3) `openvino.runtime.Output` + (3) `openvino.Output` The allowed types of values in the `partial_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -692,7 +691,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds - (4) `openvino.runtime.Dimension` + (4) `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 @@ -702,10 +701,10 @@ void regclass_graph_Model(py::module m) { The allowed types of keys in the `variables_shapes` dictionary is `str`. The allowed types of values in the `variables_shapes` are: - (1) `openvino.runtime.PartialShape` + (1) `openvino.PartialShape` (2) `list` consisting of dimensions (3) `tuple` consisting of dimensions - (4) `str`, string representation of `openvino.runtime.PartialShape` + (4) `str`, string representation of `openvino.PartialShape` When list or tuple are used to describe dimensions, each dimension can be written in form: @@ -713,7 +712,7 @@ void regclass_graph_Model(py::module m) { (2) `[min, max]`, dynamic dimension where `min` specifies lower bound and `max` specifies upper bound; the range includes both `min` and `max`; using `-1` for `min` or `max` means no known bound (3) `(min, max)`, the same as above (4) `-1` is a dynamic dimension without known bounds (4) - `openvino.runtime.Dimension` (5) `str` using next syntax: + `openvino.Dimension` (5) `str` using next syntax: '?' - to define fully dynamic dimension '1' - to define dimension which length is 1 '1..10' - to define bounded dimension @@ -743,7 +742,7 @@ void regclass_graph_Model(py::module m) { Return ops used in the model. :return: List of Nodes representing ops used in model. - :rtype: List[openvino.runtime.Node] + :rtype: List[openvino.Node] )"); model.def("get_ordered_ops", &ov::Model::get_ordered_ops, @@ -751,7 +750,7 @@ void regclass_graph_Model(py::module m) { Return ops used in the model in topological order. :return: List of sorted Nodes representing ops used in model. - :rtype: List[openvino.runtime.Node] + :rtype: List[openvino.Node] )"); model.def("get_output_op", &ov::Model::get_output_op, @@ -762,7 +761,7 @@ void regclass_graph_Model(py::module m) { :param index: output index :type index: output index :return: Node object that generates output i - :rtype: openvino.runtime.Node + :rtype: openvino.Node )"); model.def("get_output_element_type", &ov::Model::get_output_element_type, @@ -773,7 +772,7 @@ void regclass_graph_Model(py::module m) { :param index: output index :type index: int :return: Type object of output i - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); model.def("get_output_shape", &ov::Model::get_output_shape, @@ -784,7 +783,7 @@ void regclass_graph_Model(py::module m) { :param index: element index :type index: int :return: Shape object of element i - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); model.def("get_output_partial_shape", &ov::Model::get_output_partial_shape, @@ -795,7 +794,7 @@ void regclass_graph_Model(py::module m) { :param index: element index :type index: int :return: PartialShape object of element i - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); model.def("get_parameters", &ov::Model::get_parameters, @@ -854,7 +853,7 @@ void regclass_graph_Model(py::module m) { Return -1 if `value` not matched. :param value: Output containing Node - :type value: openvino.runtime.Output + :type value: openvino.Output :return: Index for value referencing it. :rtype: int )"); @@ -867,7 +866,7 @@ void regclass_graph_Model(py::module m) { Return -1 if `value` not matched. :param value: Output containing Node - :type value: openvino.runtime.Output + :type value: openvino.Output :return: Index for value referencing it. :rtype: int )"); @@ -905,7 +904,7 @@ void regclass_graph_Model(py::module m) { Return -1 if `value` not matched. :param value: Output sink node handle - :type value: openvino.runtime.Output + :type value: openvino.Output :return: Index of sink node referenced by output handle. :rtype: int )"); @@ -927,7 +926,7 @@ void regclass_graph_Model(py::module m) { Return -1 if `value` not matched. :param value: Output sink node handle - :type value: openvino.runtime.Output + :type value: openvino.Output :return: Index of sink node referenced by output handle. :rtype: int )"); @@ -952,7 +951,7 @@ void regclass_graph_Model(py::module m) { Return -1 if `sink` not matched. :param sink: Sink node. - :type sink: openvino.runtime.Node + :type sink: openvino.Node :return: Index of sink node. :rtype: int )"); @@ -1153,7 +1152,7 @@ void regclass_graph_Model(py::module m) { Delete sink node from the list of sinks. Method doesn't delete node from graph. :param sink: Sink to delete. - :type sink: openvino.runtime.Node + :type sink: openvino.Node )"); model.def("remove_variable", @@ -1215,7 +1214,7 @@ void regclass_graph_Model(py::module m) { Method doesn't validate graph, it should be done manually after all changes. :param sinks: new sink nodes. - :type sinks: List[openvino.runtime.Node] + :type sinks: List[openvino.Node] )"); model.def("add_variables", @@ -1269,7 +1268,7 @@ void regclass_graph_Model(py::module m) { Return a list of model's sinks. :return: a list of model's sinks. - :rtype: List[openvino.runtime.Node] + :rtype: List[openvino.Node] )"); model.def_property_readonly( @@ -1282,7 +1281,7 @@ void regclass_graph_Model(py::module m) { Return a list of model's sinks. :return: a list of model's sinks. - :rtype: List[openvino.runtime.Node] + :rtype: List[openvino.Node] )"); model.def( @@ -1300,13 +1299,13 @@ void regclass_graph_Model(py::module m) { Evaluate the model on inputs, putting results in outputs :param output_tensors: Tensors for the outputs to compute. One for each result - :type output_tensors: List[openvino.runtime.Tensor] + :type output_tensors: List[openvino.Tensor] :param input_tensors: Tensors for the inputs. One for each inputs. - :type input_tensors: List[openvino.runtime.Tensor] + :type input_tensors: List[openvino.Tensor] :param evaluation_context: Storage of additional settings and attributes that can be used when evaluating the model. This additional information can be shared across nodes. - :type evaluation_context: openvino.runtime.RTMap + :type evaluation_context: openvino.RTMap :rtype: bool )"); @@ -1315,7 +1314,7 @@ void regclass_graph_Model(py::module m) { R"( Return a copy of self. :return: A copy of self. - :rtype: openvino.runtime.Model + :rtype: openvino.Model )"); model.def("__repr__", [](const ov::Model& self) { @@ -1335,7 +1334,7 @@ void regclass_graph_Model(py::module m) { Returns PyRTMap which is a dictionary of user defined runtime info. :return: A dictionary of user defined data. - :rtype: openvino.runtime.RTMap + :rtype: openvino.RTMap )"); model.def( "get_rt_info", @@ -1354,7 +1353,7 @@ void regclass_graph_Model(py::module m) { :type path: List[str] :return: A runtime attribute. - :rtype: openvino.runtime.OVAny + :rtype: openvino.OVAny )"); model.def( "get_rt_info", @@ -1369,7 +1368,7 @@ void regclass_graph_Model(py::module m) { :type path: str :return: A runtime attribute. - :rtype: openvino.runtime.OVAny + :rtype: openvino.OVAny )"); model.def( "has_rt_info", diff --git a/src/bindings/python/src/pyopenvino/graph/node.cpp b/src/bindings/python/src/pyopenvino/graph/node.cpp index 146acf0ff651eb..0f10f00fa7de8e 100644 --- a/src/bindings/python/src/pyopenvino/graph/node.cpp +++ b/src/bindings/python/src/pyopenvino/graph/node.cpp @@ -41,7 +41,7 @@ PYBIND11_MAKE_OPAQUE(PyRTMap); void regclass_graph_Node(py::module m) { py::class_, PyNode> node(m, "Node", py::dynamic_attr()); - node.doc() = "openvino.runtime.Node wraps ov::Node"; + node.doc() = "openvino.Node wraps ov::Node"; node.def( "__add__", [](const std::shared_ptr& a, const std::shared_ptr b) { @@ -110,7 +110,7 @@ void regclass_graph_Node(py::module m) { }); } // Throw error with original name if stripped set_attribute was not found: - throw py::attribute_error("'openvino.runtime.Node' object has no attribute '" + name + "'"); + throw py::attribute_error("'openvino.Node' object has no attribute '" + name + "'"); } else { // regex_match is equal to "set_" if (dict_serializer.contains_attribute(stripped_name)) { return py::cpp_function([self, stripped_name](py::object& value) { @@ -123,12 +123,12 @@ void regclass_graph_Node(py::module m) { }); } // Throw error with original name if stripped set_attribute was not found: - throw py::attribute_error("'openvino.runtime.Node' object has no attribute '" + name + "'"); + throw py::attribute_error("'openvino.Node' object has no attribute '" + name + "'"); } } // If nothing was found raise AttributeError: - throw py::attribute_error("'openvino.runtime.Node' object has no attribute '" + name + "'"); + throw py::attribute_error("'openvino.Node' object has no attribute '" + name + "'"); }); node.def( @@ -146,12 +146,12 @@ void regclass_graph_Node(py::module m) { Evaluate the node on inputs, putting results in outputs :param output_tensors: Tensors for the outputs to compute. One for each result. - :type output_tensors: List[openvino.runtime.Tensor] + :type output_tensors: List[openvino.Tensor] :param input_tensors: Tensors for the inputs. One for each inputs. - :type input_tensors: List[openvino.runtime.Tensor] + :type input_tensors: List[openvino.Tensor] :param evaluation_context: Storage of additional settings and attributes that can be used when evaluating the function. This additional information can be shared across nodes. - :type evaluation_context: openvino.runtime.RTMap + :type evaluation_context: openvino.RTMap :rtype: bool )"); node.def( @@ -165,9 +165,9 @@ void regclass_graph_Node(py::module m) { Evaluate the function on inputs, putting results in outputs :param output_tensors: Tensors for the outputs to compute. One for each result. - :type output_tensors: List[openvino.runtime.Tensor] + :type output_tensors: List[openvino.Tensor] :param input_tensors: Tensors for the inputs. One for each inputs. - :type input_tensors: List[openvino.runtime.Tensor] + :type input_tensors: List[openvino.Tensor] :rtype: bool )"); node.def("get_instance_id", @@ -198,7 +198,7 @@ void regclass_graph_Node(py::module m) { Checks that there is exactly one output and returns it's element type. :return: Type of the output. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); node.def("input_values", &ov::Node::input_values, @@ -206,7 +206,7 @@ void regclass_graph_Node(py::module m) { Returns list of node's inputs, in order. :return: List of node's inputs - :rtype: List[openvino.runtime.Input] + :rtype: List[openvino.Input] )"); node.def("input_value", &ov::Node::input_value, @@ -217,7 +217,7 @@ void regclass_graph_Node(py::module m) { :param index: Index of Input. :type index: int :return: Input of this node. - :rtype: openvino.runtime.Input + :rtype: openvino.Input )"); node.def("get_input_size", &ov::Node::get_input_size, @@ -301,7 +301,7 @@ void regclass_graph_Node(py::module m) { :param index: Index of the output. :type index: int :return: Type of the output index - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); node.def("get_output_shape", &ov::Node::get_output_shape, @@ -312,7 +312,7 @@ void regclass_graph_Node(py::module m) { :param index: Index of the output. :type index: int :return: Shape of the output index - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); node.def("get_output_partial_shape", &ov::Node::get_output_partial_shape, @@ -323,7 +323,7 @@ void regclass_graph_Node(py::module m) { :param index: Index of the output. :type index: int :return: PartialShape of the output index - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); node.def("get_output_tensor", &ov::Node::get_output_tensor, @@ -384,7 +384,7 @@ void regclass_graph_Node(py::module m) { :param input_index: Index of Input. :type input_index: int :return: Input of this node. - :rtype: openvino.runtime.Input + :rtype: openvino.Input )"); node.def("inputs", (std::vector>(ov::Node::*)()) & ov::Node::inputs, @@ -392,7 +392,7 @@ void regclass_graph_Node(py::module m) { A list containing a handle for each of this node's inputs, in order. :return: List of node's inputs. - :rtype: List[openvino.runtime.Input] + :rtype: List[openvino.Input] )"); node.def("output", (ov::Output(ov::Node::*)(size_t)) & ov::Node::output, @@ -403,7 +403,7 @@ void regclass_graph_Node(py::module m) { :param output_index: Index of Output. :type output_index: int :return: Output of this node. - :rtype: openvino.runtime.Output + :rtype: openvino.Output )"); node.def("outputs", (std::vector>(ov::Node::*)()) & ov::Node::outputs, @@ -411,7 +411,7 @@ void regclass_graph_Node(py::module m) { A list containing a handle for each of this node's outputs, in order. :return: List of node's outputs. - :rtype: List[openvino.runtime.Output] + :rtype: List[openvino.Output] )"); node.def("get_rt_info", (PyRTMap & (ov::Node::*)()) & ov::Node::get_rt_info, @@ -420,7 +420,7 @@ void regclass_graph_Node(py::module m) { Returns PyRTMap which is a dictionary of user defined runtime info. :return: A dictionary of user defined data. - :rtype: openvino.runtime.RTMap + :rtype: openvino.RTMap )"); node.def("set_argument", &ov::Node::set_argument); diff --git a/src/bindings/python/src/pyopenvino/graph/node_input.cpp b/src/bindings/python/src/pyopenvino/graph/node_input.cpp index 1ce0aed9b2209d..21ca2cc7181169 100644 --- a/src/bindings/python/src/pyopenvino/graph/node_input.cpp +++ b/src/bindings/python/src/pyopenvino/graph/node_input.cpp @@ -18,7 +18,7 @@ PYBIND11_MAKE_OPAQUE(PyRTMap); void regclass_graph_Input(py::module m) { py::class_, std::shared_ptr>> input(m, "Input", py::dynamic_attr()); - input.doc() = "openvino.runtime.Input wraps ov::Input"; + input.doc() = "openvino.Input wraps ov::Input"; input.def("get_node", &ov::Input::get_node, @@ -26,7 +26,7 @@ void regclass_graph_Input(py::module m) { Get node referenced by this input handle. :return: Node object referenced by this input handle. - :rtype: openvino.runtime.Node + :rtype: openvino.Node )"); input.def("get_index", &ov::Input::get_index, @@ -42,7 +42,7 @@ void regclass_graph_Input(py::module m) { The element type of the input referred to by this input handle. :return: Type of the input. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); input.def("get_shape", &ov::Input::get_shape, @@ -50,7 +50,7 @@ void regclass_graph_Input(py::module m) { The shape of the input referred to by this input handle. :return: Shape of the input. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); input.def("get_partial_shape", &ov::Input::get_partial_shape, @@ -58,7 +58,7 @@ void regclass_graph_Input(py::module m) { The partial shape of the input referred to by this input handle. :return: PartialShape of the input. - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); input.def("get_source_output", &ov::Input::get_source_output, @@ -66,7 +66,7 @@ void regclass_graph_Input(py::module m) { A handle to the output that is connected to this input. :return: Output that is connected to the input. - :rtype: openvino.runtime.Output + :rtype: openvino.Output )"); input.def("get_tensor", &ov::Input::get_tensor, @@ -84,7 +84,7 @@ void regclass_graph_Input(py::module m) { Returns RTMap which is a dictionary of user defined runtime info. :return: A dictionary of user defined data. - :rtype: openvino.runtime.RTMap + :rtype: openvino.RTMap )"); input.def("replace_source_output", &ov::Input::replace_source_output, @@ -93,7 +93,7 @@ void regclass_graph_Input(py::module m) { Replaces the source output of this input. :param new_source_output: A handle for the output that will replace this input's source. - :type new_source_output: openvino.runtime.Input + :type new_source_output: openvino.Input )"); input.def_property_readonly("rt_info", (ov::RTMap & (ov::Input::*)()) & ov::Input::get_rt_info); input.def_property_readonly("rt_info", diff --git a/src/bindings/python/src/pyopenvino/graph/node_output.cpp b/src/bindings/python/src/pyopenvino/graph/node_output.cpp index aab89f9acc9fd5..b2bd472b484a1b 100644 --- a/src/bindings/python/src/pyopenvino/graph/node_output.cpp +++ b/src/bindings/python/src/pyopenvino/graph/node_output.cpp @@ -49,7 +49,7 @@ void def_type_dependent_functions( Removes a target input from the output referenced by this output handle. :param target_input: The target input to remove. - :type target_input: openvino.runtime.Output + :type target_input: openvino.Output )"); output.def("replace", &ov::Output::replace, @@ -58,6 +58,6 @@ void def_type_dependent_functions( Replace all users of this value with replacement. :param replacement: The node that is a replacement. - :type replacement: openvino.runtime.Output + :type replacement: openvino.Output )"); } diff --git a/src/bindings/python/src/pyopenvino/graph/node_output.hpp b/src/bindings/python/src/pyopenvino/graph/node_output.hpp index c8af3582026147..f67c821093e84a 100644 --- a/src/bindings/python/src/pyopenvino/graph/node_output.hpp +++ b/src/bindings/python/src/pyopenvino/graph/node_output.hpp @@ -36,7 +36,7 @@ template void regclass_graph_Output(py::module m, std::string typestring) { auto pyclass_name = py::detail::c_str((typestring + std::string("Output"))); - auto docs = py::detail::c_str(std::string("openvino.runtime.") + typestring + std::string("Output represents port/node output.")); + auto docs = py::detail::c_str(std::string("openvino.") + typestring + std::string("Output represents port/node output.")); py::class_, std::shared_ptr>> output(m, pyclass_name, py::dynamic_attr()); @@ -59,7 +59,7 @@ void regclass_graph_Output(py::module m, std::string typestring) }); output.def("__deepcopy__", [typestring](ov::Output& self, py::dict& memo) { - throw py::type_error("Cannot deepcopy 'openvino.runtime." + typestring + "Output' object."); + throw py::type_error("Cannot deepcopy 'openvino." + typestring + "Output' object."); }); output.def("get_node", @@ -68,7 +68,7 @@ void regclass_graph_Output(py::module m, std::string typestring) Get node referenced by this output handle. :return: Node object referenced by this output handle. - :rtype: openvino.runtime.Node + :rtype: openvino.Node )"); output.def("get_index", &ov::Output::get_index, @@ -101,7 +101,7 @@ void regclass_graph_Output(py::module m, std::string typestring) The element type of the output referred to by this output handle. :return: Type of the output. - :rtype: openvino.runtime.Type + :rtype: openvino.Type )"); output.def("get_shape", &ov::Output::get_shape, @@ -110,7 +110,7 @@ void regclass_graph_Output(py::module m, std::string typestring) The shape of the output referred to by this output handle. :return: Copy of Shape of the output. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); output.def("get_partial_shape", &ov::Output::get_partial_shape, @@ -119,7 +119,7 @@ void regclass_graph_Output(py::module m, std::string typestring) The partial shape of the output referred to by this output handle. :return: Copy of PartialShape of the output. - :rtype: openvino.runtime.PartialShape + :rtype: openvino.PartialShape )"); output.def("get_target_inputs", &ov::Output::get_target_inputs, @@ -128,7 +128,7 @@ void regclass_graph_Output(py::module m, std::string typestring) referenced by this output handle. :return: Set of Inputs. - :rtype: Set[openvino.runtime.Input] + :rtype: Set[openvino.Input] )"); output.def("_from_node", [](const std::shared_ptr& node) { return ov::Output(node); @@ -149,7 +149,7 @@ void regclass_graph_Output(py::module m, std::string typestring) Returns RTMap which is a dictionary of user defined runtime info. :return: A dictionary of user defined data. - :rtype: openvino.runtime.RTMap + :rtype: openvino.RTMap )"); output.def("__repr__", [](const ov::Output& self) { std::stringstream shape_type_ss; diff --git a/src/bindings/python/src/pyopenvino/graph/ops/assign.cpp b/src/bindings/python/src/pyopenvino/graph/ops/assign.cpp index 52320ddb439ee9..132ec1119d29c6 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/assign.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/assign.cpp @@ -15,7 +15,7 @@ namespace py = pybind11; void regclass_graph_op_Assign(py::module m) { py::class_, ov::Node> assign(m, "assign"); - assign.doc() = "openvino.runtime.op.assign wraps ov::op::v6::Assign"; + assign.doc() = "openvino.op.assign wraps ov::op::v6::Assign"; assign.def(py::init<>()); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/constant.cpp b/src/bindings/python/src/pyopenvino/graph/ops/constant.cpp index 047b8c5d3e9510..c5f704cf8bce96 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/constant.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/constant.cpp @@ -60,7 +60,7 @@ void regclass_graph_op_Constant(py::module m) { py::class_, ov::Node> constant(m, "Constant", py::buffer_protocol()); - constant.doc() = "openvino.runtime.op.Constant wraps ov::op::v0::Constant"; + constant.doc() = "openvino.op.Constant wraps ov::op::v0::Constant"; // Numpy-based constructor constant.def(py::init([](py::array& array, bool shared_memory) { return Common::object_from_data(array, shared_memory); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/if.cpp b/src/bindings/python/src/pyopenvino/graph/ops/if.cpp index 72f7bcd8dab164..1a6cc25ff570c0 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/if.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/if.cpp @@ -26,7 +26,7 @@ void regclass_graph_op_If(py::module m) { Constructs If with condition. :param execution_condition: condition node. - :type execution_condition: openvino.runtime.Output + :type execution_condition: openvino.Output :rtype: openvino.impl.op.If )"); @@ -45,7 +45,7 @@ void regclass_graph_op_If(py::module m) { Constructs If with condition. :param execution_condition: condition node. - :type execution_condition: openvino.runtime.Node + :type execution_condition: openvino.Node :rtype: openvino.impl.op.If )"); @@ -54,7 +54,7 @@ void regclass_graph_op_If(py::module m) { "get_then_body", [](ov::op::v8::If& self) { auto model = self.get_then_body(); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }, R"( @@ -68,7 +68,7 @@ void regclass_graph_op_If(py::module m) { "get_else_body", [](ov::op::v8::If& self) { auto model = self.get_else_body(); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }, R"( @@ -119,13 +119,13 @@ void regclass_graph_op_If(py::module m) { Sets new input to the operation associated with parameters of each sub-graphs. :param value: input to operation. - :type value: openvino.runtime.Output + :type value: openvino.Output :param then_result: parameter for then_body or nullptr. - :type then_result: openvino.runtime.Node + :type then_result: openvino.Node :param else_result: parameter for else_body or nullptr. - :type else_result: openvino.runtime.Node + :type else_result: openvino.Node :rtype: None )"); @@ -144,14 +144,14 @@ void regclass_graph_op_If(py::module m) { :type else_result: op.Result :return: output from operation. - :rtype: openvino.runtime.Output + :rtype: openvino.Output )"); cls.def( "get_function", [](ov::op::v8::If& self, size_t index) { auto model = self.get_function(index); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }, py::arg("index"), @@ -199,9 +199,9 @@ void regclass_graph_op_If(py::module m) { :type index: int :param inputs: list of input descriptions. - :type inputs: list[Union[openvino.runtime.op.util.MergedInputDescription, - openvino.runtime.op.util.InvariantInputDescription, - openvino.runtime.op.util.SliceInputDescription]] + :type inputs: list[Union[openvino.op.util.MergedInputDescription, + openvino.op.util.InvariantInputDescription, + openvino.op.util.SliceInputDescription]] :rtype: None )"); @@ -220,8 +220,8 @@ void regclass_graph_op_If(py::module m) { :type index: int :param outputs: list of output descriptions. - :type outputs: list[Union[openvino.runtime.op.util.BodyOutputDescription, - openvino.runtime.op.util.ConcatOutputDescription]] + :type outputs: list[Union[openvino.op.util.BodyOutputDescription, + openvino.op.util.ConcatOutputDescription]] :rtype: None )"); @@ -245,8 +245,8 @@ void regclass_graph_op_If(py::module m) { :type index: int :return: list of output descriptions. - :rtype: list[Union[openvino.runtime.op.util.BodyOutputDescription, - openvino.runtime.op.util.ConcatOutputDescription]] + :rtype: list[Union[openvino.op.util.BodyOutputDescription, + openvino.op.util.ConcatOutputDescription]] )"); cls.def( @@ -268,9 +268,9 @@ void regclass_graph_op_If(py::module m) { :type index: int :return: list of input descriptions. - :rtype: list[Union[openvino.runtime.op.util.MergedInputDescription, - openvino.runtime.op.util.InvariantInputDescription, - openvino.runtime.op.util.SliceInputDescription]] + :rtype: list[Union[openvino.op.util.MergedInputDescription, + openvino.op.util.InvariantInputDescription, + openvino.op.util.SliceInputDescription]] )"); cls.def("__repr__", [](const ov::op::v8::If& self) { diff --git a/src/bindings/python/src/pyopenvino/graph/ops/loop.cpp b/src/bindings/python/src/pyopenvino/graph/ops/loop.cpp index 2cb7334653e9f8..1d815bc7b37eee 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/loop.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/loop.cpp @@ -86,7 +86,7 @@ void regclass_graph_op_Loop(py::module m) { cls.def("get_function", [](const std::shared_ptr& self) { auto model = self->get_function(); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/parameter.cpp b/src/bindings/python/src/pyopenvino/graph/ops/parameter.cpp index 45473339b0e882..fe84bc31c20597 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/parameter.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/parameter.cpp @@ -18,7 +18,7 @@ namespace py = pybind11; void regclass_graph_op_Parameter(py::module m) { py::class_, ov::Node> parameter(m, "Parameter"); - parameter.doc() = "openvino.runtime.op.Parameter wraps ov::op::v0::Parameter"; + parameter.doc() = "openvino.op.Parameter wraps ov::op::v0::Parameter"; parameter.def("__repr__", [](const ov::Node& self) { std::string class_name = py::cast(self).get_type().attr("__name__").cast(); std::string shape = py::cast(self.get_output_partial_shape(0)).attr("__str__")().cast(); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/read_value.cpp b/src/bindings/python/src/pyopenvino/graph/ops/read_value.cpp index 53f665c512ff19..99b96e376321d1 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/read_value.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/read_value.cpp @@ -19,7 +19,7 @@ namespace py = pybind11; void regclass_graph_op_ReadValue(py::module m) { py::class_, ov::Node> read_value(m, "read_value"); - read_value.doc() = "openvino.runtime.op.read_value wraps ov::op::v6::ReadValue"; + read_value.doc() = "openvino.op.read_value wraps ov::op::v6::ReadValue"; read_value.def(py::init<>()); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/result.cpp b/src/bindings/python/src/pyopenvino/graph/ops/result.cpp index 113d464ccad898..79f419006473d7 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/result.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/result.cpp @@ -18,7 +18,7 @@ namespace py = pybind11; void regclass_graph_op_Result(py::module m) { py::class_, ov::Node> result(m, "Result"); - result.doc() = "openvino.runtime.op.Result wraps ov::op::v0::Result"; + result.doc() = "openvino.op.Result wraps ov::op::v0::Result"; result.def(py::init&>()); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/tensor_iterator.cpp b/src/bindings/python/src/pyopenvino/graph/ops/tensor_iterator.cpp index de4db8da979d7a..902f4edbb1b726 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/tensor_iterator.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/tensor_iterator.cpp @@ -63,13 +63,13 @@ void regclass_graph_op_TensorIterator(py::module m) { cls.def("get_body", [](const std::shared_ptr& self) { auto model = self->get_body(); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }); cls.def("get_function", [](const std::shared_ptr& self) { auto model = self->get_function(); - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }); diff --git a/src/bindings/python/src/pyopenvino/graph/ops/util/variable.cpp b/src/bindings/python/src/pyopenvino/graph/ops/util/variable.cpp index 456d36730aba51..7adf90d18eb5cb 100644 --- a/src/bindings/python/src/pyopenvino/graph/ops/util/variable.cpp +++ b/src/bindings/python/src/pyopenvino/graph/ops/util/variable.cpp @@ -15,7 +15,7 @@ namespace py = pybind11; void regclass_graph_op_util_Variable(py::module m) { py::class_ variable_info(m, "VariableInfo"); - variable_info.doc() = "openvino.runtime.op.util.VariableInfo wraps ov::op::util::VariableInfo"; + variable_info.doc() = "openvino.op.util.VariableInfo wraps ov::op::util::VariableInfo"; variable_info.def(py::init<>()); variable_info.def_readwrite("data_shape", &ov::op::util::VariableInfo::data_shape); variable_info.def_readwrite("data_type", &ov::op::util::VariableInfo::data_type); @@ -25,7 +25,7 @@ void regclass_graph_op_util_Variable(py::module m) { }); py::class_> variable(m, "Variable"); - variable.doc() = "openvino.runtime.op.util.Variable wraps ov::op::util::Variable"; + variable.doc() = "openvino.op.util.Variable wraps ov::op::util::Variable"; variable.def(py::init([](const ov::op::util::VariableInfo& info) { return ov::op::util::Variable{info}; }), diff --git a/src/bindings/python/src/pyopenvino/graph/partial_shape.cpp b/src/bindings/python/src/pyopenvino/graph/partial_shape.cpp index 73fc52f51f976a..9e3410600215bb 100644 --- a/src/bindings/python/src/pyopenvino/graph/partial_shape.cpp +++ b/src/bindings/python/src/pyopenvino/graph/partial_shape.cpp @@ -31,7 +31,7 @@ bool compare_shape(const ov::PartialShape& a, const T& b) { void regclass_graph_PartialShape(py::module m) { py::class_> shape(m, "PartialShape"); - shape.doc() = "openvino.runtime.PartialShape wraps ov::PartialShape"; + shape.doc() = "openvino.PartialShape wraps ov::PartialShape"; shape.def(py::init()); shape.def(py::init()); @@ -102,7 +102,7 @@ void regclass_graph_PartialShape(py::module m) { whether it is possible to merge them. :param shape: The shape to be checked for compatibility with this shape. - :type shape: openvino.runtime.PartialShape + :type shape: openvino.PartialShape :return: True if this shape is compatible with s, else False. :rtype: bool )"); @@ -113,7 +113,7 @@ void regclass_graph_PartialShape(py::module m) { Check whether this shape is a refinement of the argument. :param shape: The shape which is being compared against this shape. - :type shape: openvino.runtime.PartialShape + :type shape: openvino.PartialShape :return: True if this shape refines s, else False. :rtype: bool )"); @@ -124,7 +124,7 @@ void regclass_graph_PartialShape(py::module m) { Check whether this shape is a relaxation of the argument. :param shape: The shape which is being compared against this shape. - :type shape: openvino.runtime.PartialShape + :type shape: openvino.PartialShape :return: True if this shape relaxes s, else False. :rtype: bool )"); @@ -135,7 +135,7 @@ void regclass_graph_PartialShape(py::module m) { Check whether this shape represents the same scheme as the argument. :param shape: The shape which is being compared against this shape. - :type shape: openvino.runtime.PartialShape + :type shape: openvino.PartialShape :return: True if shape represents the same scheme as s, else False. :rtype: bool )"); @@ -143,25 +143,25 @@ void regclass_graph_PartialShape(py::module m) { &ov::PartialShape::get_max_shape, R"( :return: Get the max bounding shape. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); shape.def("get_min_shape", &ov::PartialShape::get_min_shape, R"( :return: Get the min bounding shape. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); shape.def("get_shape", &ov::PartialShape::get_shape, R"( :return: Get the unique shape. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); shape.def("to_shape", &ov::PartialShape::to_shape, R"( :return: Get the unique shape. - :rtype: openvino.runtime.Shape + :rtype: openvino.Shape )"); shape.def( "get_dimension", @@ -175,7 +175,7 @@ void regclass_graph_PartialShape(py::module m) { :param index: The index of dimension. :type index: int :return: Get the particular dimension of a partial shape. - :rtype: openvino.runtime.Dimension + :rtype: openvino.Dimension )"); shape.def( diff --git a/src/bindings/python/src/pyopenvino/graph/passes/graph_rewrite.cpp b/src/bindings/python/src/pyopenvino/graph/passes/graph_rewrite.cpp index 6f40f17828673c..d1a92cb3c1911d 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/graph_rewrite.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/graph_rewrite.cpp @@ -16,7 +16,7 @@ void regclass_passes_GraphRewrite(py::module m) { py::class_, ov::pass::ModelPass, ov::pass::PassBase> graph_rewrite(m, "GraphRewrite"); graph_rewrite.doc() = - "openvino.runtime.passes.GraphRewrite executes sequence of MatcherPass transformations in topological order"; + "openvino.passes.GraphRewrite executes sequence of MatcherPass transformations in topological order"; graph_rewrite.def(py::init<>()); graph_rewrite.def(py::init([](const std::shared_ptr& pass) { @@ -26,8 +26,8 @@ void regclass_passes_GraphRewrite(py::module m) { R"( Register single MatcherPass pass inside GraphRewrite. - :param pass: openvino.runtime.passes.MatcherPass instance - :type pass: openvino.runtime.passes.MatcherPass + :param pass: openvino.passes.MatcherPass instance + :type pass: openvino.passes.MatcherPass )"); graph_rewrite.def("add_matcher", @@ -37,8 +37,8 @@ void regclass_passes_GraphRewrite(py::module m) { R"( Register single MatcherPass pass inside GraphRewrite. - :param pass: openvino.runtime.passes.MatcherPass instance - :type pass: openvino.runtime.passes.MatcherPass + :param pass: openvino.passes.MatcherPass instance + :type pass: openvino.passes.MatcherPass )"); py::class_ back_graph_rewrite(m, "BackwardGraphRewrite"); - back_graph_rewrite.doc() = "openvino.runtime.passes.BackwardGraphRewrite executes sequence of MatcherPass " + back_graph_rewrite.doc() = "openvino.passes.BackwardGraphRewrite executes sequence of MatcherPass " "transformations in reversed topological order"; back_graph_rewrite.def(py::init<>()); @@ -58,8 +58,8 @@ void regclass_passes_GraphRewrite(py::module m) { R"( Register single MatcherPass pass inside BackwardGraphRewrite. - :param pass: openvino.runtime.passes.MatcherPass instance - :type pass: openvino.runtime.passes.MatcherPass + :param pass: openvino.passes.MatcherPass instance + :type pass: openvino.passes.MatcherPass )"); back_graph_rewrite.def( @@ -70,8 +70,8 @@ void regclass_passes_GraphRewrite(py::module m) { R"( Register single MatcherPass pass inside BackwardGraphRewrite. - :param pass: openvino.runtime.passes.MatcherPass instance - :type pass: openvino.runtime.passes.MatcherPass + :param pass: openvino.passes.MatcherPass instance + :type pass: openvino.passes.MatcherPass )"); back_graph_rewrite.def("__repr__", [](const ov::pass::BackwardGraphRewrite& self) { diff --git a/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp b/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp index 6e3ff2a201f8f5..8b07a2ba814860 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/manager.cpp @@ -22,7 +22,7 @@ using FilePaths = std::pair; void regclass_passes_Manager(py::module m) { py::class_ manager(m, "Manager"); - manager.doc() = "openvino.runtime.passes.Manager executes sequence of transformation on a given Model"; + manager.doc() = "openvino.passes.Manager executes sequence of transformation on a given Model"; manager.def(py::init<>()); manager.def("set_per_pass_validation", @@ -45,8 +45,8 @@ void regclass_passes_Manager(py::module m) { R"( Executes sequence of transformations on given Model. - :param model: openvino.runtime.Model to be transformed. - :type model: openvino.runtime.Model + :param model: openvino.Model to be transformed. + :type model: openvino.Model )"); manager.def("register_pass", @@ -56,7 +56,7 @@ void regclass_passes_Manager(py::module m) { Register pass instance for execution. Execution order matches the registration order. :param transformation: transformation instance. - :type transformation: openvino.runtime.passes.PassBase + :type transformation: openvino.passes.PassBase )"); manager.def("__repr__", [](const ov::pass::Manager& self) { diff --git a/src/bindings/python/src/pyopenvino/graph/passes/matcher_pass.cpp b/src/bindings/python/src/pyopenvino/graph/passes/matcher_pass.cpp index 88c0304fd04ea0..afa4292d3261ab 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/matcher_pass.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/matcher_pass.cpp @@ -19,7 +19,7 @@ namespace py = pybind11; void regclass_passes_Matcher(py::module m) { py::class_> matcher(m, "Matcher"); - matcher.doc() = "openvino.runtime.passes.Matcher wraps ov::pass::pattern::Matcher"; + matcher.doc() = "openvino.passes.Matcher wraps ov::pass::pattern::Matcher"; matcher.def(py::init([](const std::shared_ptr& node, const std::string& name) { return std::make_shared(node, name); }), @@ -30,7 +30,7 @@ void regclass_passes_Matcher(py::module m) { Matcher object is used for pattern matching on Model. :param node: pattern root node. - :type node: openvino.runtime.Node + :type node: openvino.Node :param name: pattern name. Usually matches the MatcherPass class name. :type name: str @@ -46,7 +46,7 @@ void regclass_passes_Matcher(py::module m) { Matcher object is used for pattern matching on Model. :param node: pattern root node output. - :type node: openvino.runtime.Output + :type node: openvino.Output :param name: pattern name. Usually matches the MatcherPass class name. :type name: str @@ -57,7 +57,7 @@ void regclass_passes_Matcher(py::module m) { R"( Get Matcher name. - :return: openvino.runtime.passes.Matcher name. + :return: openvino.passes.Matcher name. :rtype: str )"); @@ -67,7 +67,7 @@ void regclass_passes_Matcher(py::module m) { Get matched root node inside Model. Should be used after match() method is called. :return: matched node. - :rtype: openvino.runtime.Node + :rtype: openvino.Node )"); matcher.def("get_match_value", @@ -76,7 +76,7 @@ void regclass_passes_Matcher(py::module m) { Get matched node output inside Model. Should be used after match() method is called. :return: matched node output. - :rtype: openvino.runtime.Output + :rtype: openvino.Output )"); matcher.def("get_match_nodes", @@ -85,7 +85,7 @@ void regclass_passes_Matcher(py::module m) { Get NodeVector of matched nodes. Should be used after match() method is called. :return: matched nodes vector. - :rtype: List[openvino.runtime.Node] + :rtype: List[openvino.Node] )"); matcher.def("get_match_values", @@ -95,7 +95,7 @@ void regclass_passes_Matcher(py::module m) { Get OutputVector of matched outputs. Should be used after match() method is called. :return: matched outputs vector. - :rtype: List[openvino.runtime.Output] + :rtype: List[openvino.Output] )"); matcher.def("get_pattern_value_map", @@ -140,7 +140,7 @@ class PyMatcherPass : public ov::pass::MatcherPass { void regclass_passes_MatcherPass(py::module m) { py::class_, ov::pass::PassBase, PyMatcherPass> matcher_pass(m, "MatcherPass"); - matcher_pass.doc() = "openvino.runtime.passes.MatcherPass wraps ov::pass::MatcherPass"; + matcher_pass.doc() = "openvino.passes.MatcherPass wraps ov::pass::MatcherPass"; matcher_pass.def(py::init<>()); matcher_pass.def( py::init([](const std::shared_ptr& m, ov::matcher_pass_callback callback) { @@ -151,14 +151,14 @@ void regclass_passes_MatcherPass(py::module m) { R"( Create MatcherPass from existing Matcher and callback objects. - :param matcher: openvino.runtime.passes.Matcher with registered pattern. - :type matcher: openvino.runtime.passes.Matcher + :param matcher: openvino.passes.Matcher with registered pattern. + :type matcher: openvino.passes.Matcher :param callback: Function that performs transformation on the matched nodes. :type callback: function - :return: created openvino.runtime.passes.MatcherPass instance. - :rtype: openvino.runtime.passes.MatcherPass + :return: created openvino.passes.MatcherPass instance. + :rtype: openvino.passes.MatcherPass )"); matcher_pass.def("apply", @@ -177,11 +177,11 @@ void regclass_passes_MatcherPass(py::module m) { R"( Register node for additional pattern matching. - :param node: openvino.runtime.Node for matching. - :type node: openvino.runtime.Node + :param node: openvino.Node for matching. + :type node: openvino.Node :return: registered node instance - :rtype: openvino.runtime.Node + :rtype: openvino.Node )"); matcher_pass.def("register_matcher", @@ -193,8 +193,8 @@ void regclass_passes_MatcherPass(py::module m) { R"( Initialize matcher and callback for further execution. - :param matcher: openvino.runtime.passes.Matcher with registered pattern. - :type matcher: openvino.runtime.passes.Matcher + :param matcher: openvino.passes.Matcher with registered pattern. + :type matcher: openvino.passes.Matcher :param callback: Function that performs transformation on the matched nodes. :type callback: function diff --git a/src/bindings/python/src/pyopenvino/graph/passes/model_pass.cpp b/src/bindings/python/src/pyopenvino/graph/passes/model_pass.cpp index bbb985f888bd40..8947a4871e59dc 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/model_pass.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/model_pass.cpp @@ -32,7 +32,7 @@ void regclass_passes_ModelPass(py::module m) { py::class_, ov::pass::PassBase, PyModelPass> model_pass( m, "ModelPass"); - model_pass.doc() = "openvino.runtime.passes.ModelPass wraps ov::pass::ModelPass"; + model_pass.doc() = "openvino.passes.ModelPass wraps ov::pass::ModelPass"; model_pass.def(py::init<>()); model_pass.def("run_on_model", &ov::pass::ModelPass::run_on_model, @@ -40,8 +40,8 @@ void regclass_passes_ModelPass(py::module m) { R"( run_on_model must be defined in inherited class. This method is used to work with Model directly. - :param model: openvino.runtime.Model to be transformed. - :type model: openvino.runtime.Model + :param model: openvino.Model to be transformed. + :type model: openvino.Model :return: True in case if Model was changed and False otherwise. :rtype: bool diff --git a/src/bindings/python/src/pyopenvino/graph/passes/pass_base.cpp b/src/bindings/python/src/pyopenvino/graph/passes/pass_base.cpp index 0262254839be75..1823f570c9e18a 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/pass_base.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/pass_base.cpp @@ -15,7 +15,7 @@ namespace py = pybind11; void regclass_passes_PassBase(py::module m) { py::class_> pass_base(m, "PassBase"); - pass_base.doc() = "openvino.runtime.passes.PassBase wraps ov::pass::PassBase"; + pass_base.doc() = "openvino.passes.PassBase wraps ov::pass::PassBase"; pass_base.def("set_name", &ov::pass::PassBase::set_name, py::arg("name"), diff --git a/src/bindings/python/src/pyopenvino/graph/passes/pattern_ops.cpp b/src/bindings/python/src/pyopenvino/graph/passes/pattern_ops.cpp index 59fa656432e7ea..fa9dbab63e7b89 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/pattern_ops.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/pattern_ops.cpp @@ -59,7 +59,7 @@ static void reg_pattern_wrap_type(py::module m) { py::class_, ov::Node> wrap_type( m, "WrapType"); - wrap_type.doc() = "openvino.runtime.passes.WrapType wraps ov::pass::pattern::op::WrapType"; + wrap_type.doc() = "openvino.passes.WrapType wraps ov::pass::pattern::op::WrapType"; wrap_type.def(py::init([](const std::string& type_name) { return std::make_shared(get_type(type_name)); @@ -101,7 +101,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param input: Node output. - :type input: openvino.runtime.Output + :type input: openvino.Output )"); wrap_type.def(py::init([](const std::string& type_name, const std::shared_ptr& input) { @@ -118,7 +118,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param input: Input node. - :type input: openvino.runtime.Node + :type input: openvino.Node )"); wrap_type.def(py::init([](const std::string& type_name, const ov::Output& input, const Predicate& pred) { @@ -136,7 +136,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param input: Node output. - :type input: openvino.runtime.Output + :type input: openvino.Output :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -158,7 +158,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param input: Input node. - :type input: openvino.runtime.Node + :type input: openvino.Node :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -176,7 +176,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param inputs: Node outputs. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] )"); wrap_type.def(py::init([](const std::string& type_name, const ov::NodeVector& inputs) { @@ -193,7 +193,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param inputs: Input nodes. - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] )"); wrap_type.def(py::init([](const std::string& type_name, const ov::OutputVector& inputs, const Predicate& pred) { @@ -209,7 +209,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param inputs: Node outputs. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -230,7 +230,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: str :param inputs: Input nodes. - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -276,7 +276,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param input: Node output. - :type input: openvino.runtime.Output + :type input: openvino.Output )"); wrap_type.def(py::init([](const std::vector& type_names, const std::shared_ptr& input) { @@ -293,7 +293,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_name: List[str] :param input: Input node. - :type input: openvino.runtime.Node + :type input: openvino.Node )"); wrap_type.def( @@ -313,7 +313,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param input: Node output. - :type input: openvino.runtime.Output + :type input: openvino.Output :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -336,7 +336,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param input: Input node. - :type input: openvino.runtime.Node + :type input: openvino.Node :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -354,7 +354,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param inputs: Nodes outputs. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] )"); wrap_type.def(py::init([](const std::vector& type_names, const ov::NodeVector& inputs) { @@ -371,7 +371,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param inputs: Input nodes. - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] )"); wrap_type.def( @@ -388,7 +388,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param inputs: Nodes outputs. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -410,7 +410,7 @@ static void reg_pattern_wrap_type(py::module m) { :type type_names: List[str] :param inputs: Input nodes. - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -423,7 +423,7 @@ static void reg_pattern_wrap_type(py::module m) { static void reg_pattern_or(py::module m) { py::class_, ov::Node> or_type(m, "Or"); - or_type.doc() = "openvino.runtime.passes.Or wraps ov::pass::pattern::op::Or"; + or_type.doc() = "openvino.passes.Or wraps ov::pass::pattern::op::Or"; or_type.def(py::init([](const ov::OutputVector& inputs) { return std::make_shared(inputs); @@ -433,7 +433,7 @@ static void reg_pattern_or(py::module m) { Create pattern Or operation which is used to match any of given inputs. :param inputs: Operation inputs. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] )"); or_type.def(py::init([](const ov::NodeVector& inputs) { @@ -444,7 +444,7 @@ static void reg_pattern_or(py::module m) { Create pattern Or operation which is used to match any of given inputs. :param inputs: Operation inputs. - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] )"); or_type.def("__repr__", [](const ov::pass::pattern::op::Or& self) { @@ -456,7 +456,7 @@ static void reg_pattern_any_input(py::module m) { py::class_, ov::Node> any_input( m, "AnyInput"); - any_input.doc() = "openvino.runtime.passes.AnyInput wraps ov::pass::pattern::op::Label"; + any_input.doc() = "openvino.passes.AnyInput wraps ov::pass::pattern::op::Label"; any_input.def(py::init([]() { return std::make_shared(); @@ -486,7 +486,7 @@ static void reg_pattern_any_input(py::module m) { static void reg_pattern_optional(py::module m) { py::class_, ov::Node> optional_type(m, "Optional"); - optional_type.doc() = "openvino.runtime.passes.Optional wraps ov::pass::pattern::op::Optional"; + optional_type.doc() = "openvino.passes.Optional wraps ov::pass::pattern::op::Optional"; optional_type.def(py::init([](const std::vector& type_names) { return std::make_shared(get_types(type_names)); @@ -513,7 +513,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param input: input node's output. - :type input: openvino.runtime.Output + :type input: openvino.Output )"); optional_type.def(py::init([](const std::vector& type_names, const std::shared_ptr& input) { @@ -530,7 +530,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param input: input node. - :type input: openvino.runtime.Node + :type input: openvino.Node )"); optional_type.def( @@ -546,7 +546,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param inputs: input node's output list. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] )"); optional_type.def(py::init([](const std::vector& type_names, const ov::NodeVector& inputs) { @@ -563,7 +563,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param inputs: input node list - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] )"); optional_type.def(py::init([](const std::vector& type_names, const Predicate& predicate) { @@ -600,7 +600,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param input: input node's output. - :type input: openvino.runtime.Output + :type input: openvino.Output :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -623,7 +623,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param input: input node - :type input: openvino.runtime.Node + :type input: openvino.Node :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -644,7 +644,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param inputs: input node's output list. - :type inputs: List[openvino.runtime.Output] + :type inputs: List[openvino.Output] :param predicate: Function that performs additional checks for matching. :type predicate: function @@ -666,7 +666,7 @@ static void reg_pattern_optional(py::module m) { :type type_names: List[str] :param inputs: input node list - :type inputs: List[openvino.runtime.Node] + :type inputs: List[openvino.Node] :param predicate: Function that performs additional checks for matching. :type predicate: function diff --git a/src/bindings/python/src/pyopenvino/graph/passes/regmodule_graph_passes.cpp b/src/bindings/python/src/pyopenvino/graph/passes/regmodule_graph_passes.cpp index 511144931c37ec..39a47bda2af389 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/regmodule_graph_passes.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/regmodule_graph_passes.cpp @@ -17,7 +17,7 @@ namespace py = pybind11; void regmodule_graph_passes(py::module m) { - py::module m_passes = m.def_submodule("passes", "Package openvino.runtime.passes wraps ov::passes"); + py::module m_passes = m.def_submodule("passes", "Package openvino.passes wraps ov::passes"); regclass_passes_PassBase(m_passes); regclass_passes_ModelPass(m_passes); regclass_passes_GraphRewrite(m_passes); diff --git a/src/bindings/python/src/pyopenvino/graph/passes/transformations.cpp b/src/bindings/python/src/pyopenvino/graph/passes/transformations.cpp index 7c8797fc4ecc9c..574ab29ebd3db0 100644 --- a/src/bindings/python/src/pyopenvino/graph/passes/transformations.cpp +++ b/src/bindings/python/src/pyopenvino/graph/passes/transformations.cpp @@ -31,7 +31,7 @@ void regclass_transformations(py::module m) { py::class_, ov::pass::ModelPass, ov::pass::PassBase> serialize(m, "Serialize"); - serialize.doc() = "openvino.runtime.passes.Serialize transformation"; + serialize.doc() = "openvino.passes.Serialize transformation"; serialize.def( py::init([](const py::object& path_to_xml, const py::object& path_to_bin, const py::object& version) { @@ -62,7 +62,7 @@ void regclass_transformations(py::module m) { :type path_to_xml: Union[str, bytes, pathlib.Path] :param version: Optional serialized IR version. - :type version: Union[str, openvino.runtime.passes.Version] + :type version: Union[str, openvino.passes.Version] )"); serialize.def("__repr__", [](const ov::pass::Serialize& self) { @@ -74,7 +74,7 @@ void regclass_transformations(py::module m) { ov::pass::ModelPass, ov::pass::PassBase> cf(m, "ConstantFolding"); - cf.doc() = "openvino.runtime.passes.ConstantFolding transformation"; + cf.doc() = "openvino.passes.ConstantFolding transformation"; cf.def(py::init<>()); cf.def("__repr__", [](const ov::pass::ConstantFolding& self) { return Common::get_simple_repr(self); @@ -85,7 +85,7 @@ void regclass_transformations(py::module m) { ov::pass::ModelPass, ov::pass::PassBase> visualize(m, "VisualizeTree"); - visualize.doc() = "openvino.runtime.passes.VisualizeTree transformation"; + visualize.doc() = "openvino.passes.VisualizeTree transformation"; visualize.def(py::init(), py::arg("file_name"), py::arg("nm") = nullptr, @@ -108,7 +108,7 @@ void regclass_transformations(py::module m) { py::class_, ov::pass::ModelPass, ov::pass::PassBase> make_stateful(m, "MakeStateful"); - make_stateful.doc() = "openvino.runtime.passes.MakeStateful transformation"; + make_stateful.doc() = "openvino.passes.MakeStateful transformation"; make_stateful.def( py::init(), py::arg("pairs_to_replace"), @@ -131,7 +131,7 @@ void regclass_transformations(py::module m) { py::class_, ov::pass::ModelPass, ov::pass::PassBase> low_latency(m, "LowLatency2"); - low_latency.doc() = "openvino.runtime.passes.LowLatency2 transformation"; + low_latency.doc() = "openvino.passes.LowLatency2 transformation"; low_latency.def(py::init(), py::arg("use_const_initializer") = true, @@ -156,7 +156,7 @@ void regclass_transformations(py::module m) { ov::pass::ModelPass, ov::pass::PassBase> convert(m, "ConvertFP32ToFP16"); - convert.doc() = "openvino.runtime.passes.ConvertFP32ToFP16 transformation"; + convert.doc() = "openvino.passes.ConvertFP32ToFP16 transformation"; convert.def(py::init<>()); convert.def("__repr__", [](const ov::pass::ConvertFP32ToFP16& self) { return Common::get_simple_repr(self); diff --git a/src/bindings/python/src/pyopenvino/graph/preprocess/pre_post_process.cpp b/src/bindings/python/src/pyopenvino/graph/preprocess/pre_post_process.cpp index 8daa1ff55ffce8..eda38c43759339 100644 --- a/src/bindings/python/src/pyopenvino/graph/preprocess/pre_post_process.cpp +++ b/src/bindings/python/src/pyopenvino/graph/preprocess/pre_post_process.cpp @@ -22,7 +22,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { py::class_> steps( m, "PreProcessSteps"); - steps.doc() = "openvino.runtime.preprocess.PreProcessSteps wraps ov::preprocess::PreProcessSteps"; + steps.doc() = "openvino.preprocess.PreProcessSteps wraps ov::preprocess::PreProcessSteps"; steps.def( "mean", @@ -37,7 +37,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { :param value: Value to subtract. :type value: float :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -53,7 +53,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { :param values: Values to subtract. :type values: List[float] :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -69,7 +69,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { :param value: Value used in division. :type value: float :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -85,7 +85,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { :param values: Values which are used in division. :type values: List[float] :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -93,15 +93,15 @@ static void regclass_graph_PreProcessSteps(py::module m) { [](ov::preprocess::PreProcessSteps& self, ov::element::Type type = {}) { return &self.convert_element_type(type); }, - py::arg_v("type", ov::element::undefined, "openvino.runtime.Type.undefined"), + py::arg_v("type", ov::element::undefined, "openvino.Type.undefined"), R"( Converts input tensor element type to specified type. Input tensor must have openvino.Type data type. :param type: Destination type. If not specified, type will be taken from model input's element type - :type type: openvino.runtime.Type + :type type: openvino.Type :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -113,10 +113,10 @@ static void regclass_graph_PreProcessSteps(py::module m) { R"( Adds custom preprocessing operation. - :param operation: Python's function which takes `openvino.runtime.Output` as input argument and returns`openvino.runtime.Output`. + :param operation: Python's function which takes `openvino.Output` as input argument and returns`openvino.Output`. :type operation: function :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); steps.def( @@ -224,7 +224,7 @@ static void regclass_graph_PreProcessSteps(py::module m) { :param mode: pad_mode specifies the method used to generate new element values. :type mode: string :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.PreProcessSteps + :rtype: openvino.PreProcessSteps )"); } @@ -232,22 +232,22 @@ static void regclass_graph_PostProcessSteps(py::module m) { py::class_> steps( m, "PostProcessSteps"); - steps.doc() = "openvino.runtime.preprocess.PostprocessSteps wraps ov::preprocess::PostProcessSteps"; + steps.doc() = "openvino.preprocess.PostprocessSteps wraps ov::preprocess::PostProcessSteps"; steps.def( "convert_element_type", [](ov::preprocess::PostProcessSteps& self, ov::element::Type type = {}) { return &self.convert_element_type(type); }, - py::arg_v("type", ov::element::undefined, "openvino.runtime.Type.undefined"), + py::arg_v("type", ov::element::undefined, "openvino.Type.undefined"), R"( Converts tensor element type to specified type. Tensor must have openvino.Type data type. :param type: Destination type. If not specified, type will be taken from model output's element type. - :type type: openvino.runtime.Type + :type type: openvino.Type :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PostProcessSteps + :rtype: openvino.preprocess.PostProcessSteps )"); steps.def( @@ -273,10 +273,10 @@ static void regclass_graph_PostProcessSteps(py::module m) { R"( Adds custom postprocessing operation. - :param operation: Python's function which takes `openvino.runtime.Output` as input argument and returns`openvino.runtime.Output`. + :param operation: Python's function which takes `openvino.Output` as input argument and returns`openvino.Output`. :type operation: function :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.PreProcessSteps + :rtype: openvino.preprocess.PreProcessSteps )"); } @@ -284,7 +284,7 @@ static void regclass_graph_InputTensorInfo(py::module m) { py::class_> info( m, "InputTensorInfo"); - info.doc() = "openvino.runtime.preprocess.InputTensorInfo wraps ov::preprocess::InputTensorInfo"; + info.doc() = "openvino.preprocess.InputTensorInfo wraps ov::preprocess::InputTensorInfo"; info.def( "set_element_type", @@ -297,9 +297,9 @@ static void regclass_graph_InputTensorInfo(py::module m) { conversion of element type will be done automatically. :param type: Client's input tensor element type. - :type type: openvino.runtime.Type + :type type: openvino.Type :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.InputTensorInfo + :rtype: openvino.preprocess.InputTensorInfo )"); info.def( @@ -312,7 +312,7 @@ static void regclass_graph_InputTensorInfo(py::module m) { Set layout for input tensor info :param layout: layout to be set - :type layout: Union[str, openvino.runtime.Layout] + :type layout: Union[str, openvino.Layout] )"); info.def("set_spatial_dynamic_shape", [](ov::preprocess::InputTensorInfo& self) { @@ -364,16 +364,16 @@ static void regclass_graph_InputTensorInfo(py::module m) { [](ov::preprocess::InputTensorInfo& self, const ov::Tensor& tensor) { return &self.set_from(tensor); }, - py::arg("runtime_tensor"), + py::arg("tensor"), R"( Helper function to reuse element type and shape from user's created tensor. Overwrites previously set shape and element type via `set_shape` and `set_element_type' methods. This method should be - used only in case if runtime tensor is already known and avaiable before. + used only in case if tensor is already known and avaiable before. - :param runtime_tensor: User's created tensor - :type type: openvino.runtime.Tensor + :param tensor: User's created tensor + :type type: openvino.Tensor :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.InputTensorInfo + :rtype: openvino.preprocess.InputTensorInfo )"); info.def( @@ -382,16 +382,16 @@ static void regclass_graph_InputTensorInfo(py::module m) { // Convert to contiguous array if not already C-style. return &self.set_from(Common::object_from_data(numpy_array, false)); }, - py::arg("runtime_tensor"), + py::arg("tensor"), R"( Helper function to reuse element type and shape from user's created tensor. Overwrites previously set shape and element type via `set_shape` and `set_element_type' methods. This method should be - used only in case if runtime tensor is already known and avaiable before. + used only in case if tensor is already known and avaiable before. - :param runtime_tensor: User's created numpy array + :param tensor: User's created numpy array :type type: numpy.ndarray :return: Reference to itself, allows chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.InputTensorInfo + :rtype: openvino.preprocess.InputTensorInfo )"); } @@ -399,7 +399,7 @@ static void regclass_graph_OutputTensorInfo(py::module m) { py::class_> info( m, "OutputTensorInfo"); - info.doc() = "openvino.runtime.preprocess.OutputTensorInfo wraps ov::preprocess::OutputTensorInfo"; + info.doc() = "openvino.preprocess.OutputTensorInfo wraps ov::preprocess::OutputTensorInfo"; info.def( "set_element_type", @@ -412,9 +412,9 @@ static void regclass_graph_OutputTensorInfo(py::module m) { conversion of element type will be done automatically. :param type: Client's output tensor element type. - :type type: openvino.runtime.Type + :type type: openvino.Type :return: Reference to itself to allow chaining of calls in client's code in a builder-like manner. - :rtype: openvino.runtime.preprocess.OutputTensorInfo + :rtype: openvino.preprocess.OutputTensorInfo )"); info.def( @@ -427,13 +427,13 @@ static void regclass_graph_OutputTensorInfo(py::module m) { Set layout for output tensor info :param layout: layout to be set - :type layout: Union[str, openvino.runtime.Layout] + :type layout: Union[str, openvino.Layout] )"); } static void regclass_graph_InputInfo(py::module m) { py::class_> inp(m, "InputInfo"); - inp.doc() = "openvino.runtime.preprocess.InputInfo wraps ov::preprocess::InputInfo"; + inp.doc() = "openvino.preprocess.InputInfo wraps ov::preprocess::InputInfo"; inp.def("tensor", [](ov::preprocess::InputInfo& self) { return &self.tensor(); @@ -450,7 +450,7 @@ static void regclass_graph_InputInfo(py::module m) { static void regclass_graph_OutputInfo(py::module m) { py::class_> out(m, "OutputInfo"); - out.doc() = "openvino.runtime.preprocess.OutputInfo wraps ov::preprocess::OutputInfo"; + out.doc() = "openvino.preprocess.OutputInfo wraps ov::preprocess::OutputInfo"; out.def("tensor", [](ov::preprocess::OutputInfo& self) { return &self.tensor(); @@ -469,7 +469,7 @@ static void regclass_graph_OutputModelInfo(py::module m) { py::class_> info( m, "OutputModelInfo"); - info.doc() = "openvino.runtime.preprocess.OutputModelInfo wraps ov::preprocess::OutputModelInfo"; + info.doc() = "openvino.preprocess.OutputModelInfo wraps ov::preprocess::OutputModelInfo"; info.def( "set_layout", @@ -481,7 +481,7 @@ static void regclass_graph_OutputModelInfo(py::module m) { Set layout for output model info :param layout: layout to be set - :type layout: Union[str, openvino.runtime.Layout] + :type layout: Union[str, openvino.Layout] )"); } @@ -489,7 +489,7 @@ static void regclass_graph_InputModelInfo(py::module m) { py::class_> info( m, "InputModelInfo"); - info.doc() = "openvino.runtime.preprocess.InputModelInfo wraps ov::preprocess::InputModelInfo"; + info.doc() = "openvino.preprocess.InputModelInfo wraps ov::preprocess::InputModelInfo"; info.def( "set_layout", @@ -500,7 +500,7 @@ static void regclass_graph_InputModelInfo(py::module m) { R"( Set layout for input model :param layout: layout to be set - :type layout: Union[str, openvino.runtime.Layout] + :type layout: Union[str, openvino.Layout] )"); } @@ -552,7 +552,7 @@ void regclass_graph_PrePostProcessor(py::module m) { py::class_> proc( m, "PrePostProcessor"); - proc.doc() = "openvino.runtime.preprocess.PrePostProcessor wraps ov::preprocess::PrePostProcessor"; + proc.doc() = "openvino.preprocess.PrePostProcessor wraps ov::preprocess::PrePostProcessor"; proc.def(py::init([](const py::object& ie_api_model) { const auto model = Common::utils::convert_to_model(ie_api_model); @@ -605,7 +605,7 @@ void regclass_graph_PrePostProcessor(py::module m) { py::gil_scoped_release release; model = self.build(); } - py::type model_class = py::module_::import("openvino.runtime").attr("Model"); + py::type model_class = py::module_::import("openvino").attr("Model"); return model_class(py::cast(model)); }); diff --git a/src/bindings/python/src/pyopenvino/graph/rt_map.cpp b/src/bindings/python/src/pyopenvino/graph/rt_map.cpp index a453c672964b74..07efb1877cc355 100644 --- a/src/bindings/python/src/pyopenvino/graph/rt_map.cpp +++ b/src/bindings/python/src/pyopenvino/graph/rt_map.cpp @@ -60,7 +60,7 @@ class PyRTMapIterator { void regclass_graph_PyRTMap(py::module m) { auto py_map = py::class_(m, "RTMap"); - py_map.doc() = "openvino.runtime.RTMap makes bindings for std::map, which can later be used as ov::Node::RTMap"; py::class_(m, "Iterator") diff --git a/src/bindings/python/src/pyopenvino/graph/shape.cpp b/src/bindings/python/src/pyopenvino/graph/shape.cpp index 32fad8118ec9bb..4842a6b63ffbc6 100644 --- a/src/bindings/python/src/pyopenvino/graph/shape.cpp +++ b/src/bindings/python/src/pyopenvino/graph/shape.cpp @@ -27,7 +27,7 @@ bool compare_shape(const ov::Shape& a, const T& b) { void regclass_graph_Shape(py::module m) { py::class_> shape(m, "Shape"); - shape.doc() = "openvino.runtime.Shape wraps ov::Shape"; + shape.doc() = "openvino.Shape wraps ov::Shape"; shape.def(py::init<>()); shape.def(py::init&>(), py::arg("axis_lengths")); shape.def(py::init&>(), py::arg("axis_lengths")); diff --git a/src/bindings/python/src/pyopenvino/graph/strides.cpp b/src/bindings/python/src/pyopenvino/graph/strides.cpp index 31a5c18e3a2a18..507e00ddd9b924 100644 --- a/src/bindings/python/src/pyopenvino/graph/strides.cpp +++ b/src/bindings/python/src/pyopenvino/graph/strides.cpp @@ -26,7 +26,7 @@ bool compare_strides(const ov::Strides& a, const T& b) { void regclass_graph_Strides(py::module m) { py::class_> strides(m, "Strides"); - strides.doc() = "openvino.runtime.Strides wraps ov::Strides"; + strides.doc() = "openvino.Strides wraps ov::Strides"; strides.def(py::init&>(), py::arg("axis_strides")); strides.def(py::init&>(), py::arg("axis_strides")); strides.def(py::init(), py::arg("axis_strides")); diff --git a/src/bindings/python/src/pyopenvino/graph/symbol.cpp b/src/bindings/python/src/pyopenvino/graph/symbol.cpp index 7dfaa4cd736272..d24ab813b96064 100644 --- a/src/bindings/python/src/pyopenvino/graph/symbol.cpp +++ b/src/bindings/python/src/pyopenvino/graph/symbol.cpp @@ -12,7 +12,7 @@ namespace py = pybind11; void regclass_graph_Symbol(py::module m) { py::class_> symbol(m, "Symbol"); - symbol.doc() = "openvino.runtime.Symbol wraps ov::Symbol"; + symbol.doc() = "openvino.Symbol wraps ov::Symbol"; symbol.def(py::init([]() { return std::make_shared(); diff --git a/src/bindings/python/src/pyopenvino/graph/types/element_type.cpp b/src/bindings/python/src/pyopenvino/graph/types/element_type.cpp index 2a807ce5cb54a6..66e0eda890e309 100644 --- a/src/bindings/python/src/pyopenvino/graph/types/element_type.cpp +++ b/src/bindings/python/src/pyopenvino/graph/types/element_type.cpp @@ -15,7 +15,7 @@ namespace py = pybind11; void regclass_graph_Type(py::module m) { py::class_> type(m, "Type"); - type.doc() = "openvino.runtime.Type wraps ov::element::Type"; + type.doc() = "openvino.Type wraps ov::element::Type"; type.def(py::init([](py::object& np_literal) { auto dtype = py::dtype::from_args(np_literal); @@ -96,7 +96,7 @@ void regclass_graph_Type(py::module m) { `other`. :param other: The element type to compare this element type to. - :type other: openvino.runtime.Type + :type other: openvino.Type :return: `True` if element types are compatible, otherwise `False`. :rtype: bool )"); @@ -117,10 +117,10 @@ void regclass_graph_Type(py::module m) { otherwise return None. :param other: The element type to merge with this element type. - :type other: openvino.runtime.Type + :type other: openvino.Type :return: If element types are compatible return the least restrictive Type, otherwise `None`. - :rtype: Union[openvino.runtime.Type|None] + :rtype: Union[openvino.Type|None] )"); type.def( diff --git a/src/bindings/python/src/pyopenvino/graph/util.cpp b/src/bindings/python/src/pyopenvino/graph/util.cpp index 4bf3a69ba9052a..3fd297adc34a13 100644 --- a/src/bindings/python/src/pyopenvino/graph/util.cpp +++ b/src/bindings/python/src/pyopenvino/graph/util.cpp @@ -24,7 +24,7 @@ inline void* numpy_to_c(py::array a) { } void regmodule_graph_util(py::module m) { - py::module mod = m.def_submodule("util", "openvino.runtime.utils"); + py::module mod = m.def_submodule("util", "openvino.utils"); mod.def("numpy_to_c", &numpy_to_c); mod.def("replace_output_update_name", &ov::replace_output_update_name, py::arg("output"), py::arg("target_output")); diff --git a/src/bindings/python/src/pyopenvino/pyopenvino.cpp b/src/bindings/python/src/pyopenvino/pyopenvino.cpp index 00d43223c1a6c9..5d6f73c538599d 100644 --- a/src/bindings/python/src/pyopenvino/pyopenvino.cpp +++ b/src/bindings/python/src/pyopenvino/pyopenvino.cpp @@ -147,7 +147,7 @@ PYBIND11_MODULE(_pyopenvino, m) { when it is not related to debugging. :param model: model which will be converted to IR representation - :type model: openvino.runtime.Model + :type model: openvino.Model :param xml_path: path where .xml file will be saved :type xml_path: Union[str, bytes, pathlib.Path] :param bin_path: path where .bin file will be saved (optional), @@ -204,7 +204,7 @@ PYBIND11_MODULE(_pyopenvino, m) { compressed to FP16, debug information in model nodes are cleaned up, etc. :param model: model which will be converted to IR representation - :type model: openvino.runtime.Model + :type model: openvino.Model :param output_model: path to output model file :type output_model: Union[str, bytes, pathlib.Path] :param compress_to_fp16: whether to compress floating point weights to FP16 (default: True). The parameter is ignored for pre-optimized models. @@ -267,7 +267,7 @@ PYBIND11_MODULE(_pyopenvino, m) { regmodule_graph_op_util(m_op); regmodule_experimental(m); py::module m_preprocess = - m.def_submodule("preprocess", "Package openvino.runtime.preprocess that wraps ov::preprocess"); + m.def_submodule("preprocess", "Package openvino.preprocess that wraps ov::preprocess"); regclass_graph_PrePostProcessor(m_preprocess); regclass_graph_Model(m); regmodule_graph_passes(m); diff --git a/src/bindings/python/tests/test_graph/test_core.py b/src/bindings/python/tests/test_graph/test_core.py index 697d212e0b3eaf..a75d6aa4059ac9 100644 --- a/src/bindings/python/tests/test_graph/test_core.py +++ b/src/bindings/python/tests/test_graph/test_core.py @@ -203,7 +203,7 @@ def test_partial_shape(): PartialShape([range(10)]) assert ( "Incorrect type for dimension. Expected types are: " - "int, str, openvino.runtime.Dimension, list/tuple with lower " + "int, str, openvino.Dimension, list/tuple with lower " "and upper values for dynamic dimension." in str(e.value) ) diff --git a/src/bindings/python/tests/test_runtime/test_compiled_model.py b/src/bindings/python/tests/test_runtime/test_compiled_model.py index 3f885bf98b53ee..9a914b803652c4 100644 --- a/src/bindings/python/tests/test_runtime/test_compiled_model.py +++ b/src/bindings/python/tests/test_runtime/test_compiled_model.py @@ -225,7 +225,7 @@ def test_inputs_docs(device): compiled_model = generate_relu_compiled_model(device) input_0 = compiled_model.inputs[0] - assert input_0.__doc__ == "openvino.runtime.ConstOutput represents port/node output." + assert input_0.__doc__ == "openvino.ConstOutput represents port/node output." def test_infer_new_request_numpy(device): diff --git a/src/bindings/python/tests/test_runtime/test_input_node.py b/src/bindings/python/tests/test_runtime/test_input_node.py index e791a9c20c0c04..ffc3aebc3b76b6 100644 --- a/src/bindings/python/tests/test_runtime/test_input_node.py +++ b/src/bindings/python/tests/test_runtime/test_input_node.py @@ -27,7 +27,7 @@ def test_const_output_docs(device): compiled_model = core.compile_model(model, device) net_input = compiled_model.output(0) input_node = net_input.get_node().inputs()[0] - exptected_string = "openvino.runtime.Input wraps ov::Input" + exptected_string = "openvino.Input wraps ov::Input" assert input_node.__doc__ == exptected_string diff --git a/src/bindings/python/tests/test_runtime/test_model.py b/src/bindings/python/tests/test_runtime/test_model.py index 265c504efa36ff..c247c066b27551 100644 --- a/src/bindings/python/tests/test_runtime/test_model.py +++ b/src/bindings/python/tests/test_runtime/test_model.py @@ -507,14 +507,14 @@ def check_shape(new_shape): model.reshape({model.input().node: shape10}) assert ( "Incorrect key type to reshape a model, " - "expected keys as openvino.runtime.Output, int or str." in str(e.value) + "expected keys as openvino.Output, int or str." in str(e.value) ) with pytest.raises(TypeError) as e: model.reshape({0: range(1, 9)}) assert ( "Incorrect value type to reshape a model, " - "expected values as openvino.runtime.PartialShape, str, list or tuple." + "expected values as openvino.PartialShape, str, list or tuple." in str(e.value) ) @@ -593,7 +593,7 @@ def check_shape(new_shape): model.reshape({0: shape10}, {var_id: range(1, 9)}) assert ( "Incorrect value type to reshape a model, " - "expected values as openvino.runtime.PartialShape, str, list or tuple." + "expected values as openvino.PartialShape, str, list or tuple." in str(e.value) ) @@ -812,7 +812,7 @@ def test_copy_failed(): model = generate_add_model() with pytest.raises(TypeError) as e: copy(model) - assert "Cannot copy 'openvino.runtime.Model'. Please, use deepcopy instead." in str(e.value) + assert "Cannot copy 'openvino.Model'. Please, use deepcopy instead." in str(e.value) def test_model_attr_not_found(): diff --git a/src/bindings/python/tests/test_runtime/test_output_const_node.py b/src/bindings/python/tests/test_runtime/test_output_const_node.py index 718a6e3f164061..5c33647c1d7c14 100644 --- a/src/bindings/python/tests/test_runtime/test_output_const_node.py +++ b/src/bindings/python/tests/test_runtime/test_output_const_node.py @@ -34,7 +34,7 @@ def test_const_output_docs(device): model = get_relu_model() compiled_model = core.compile_model(model, device) node = compiled_model.input(0) - exptected_string = "openvino.runtime.ConstOutput represents port/node output." + exptected_string = "openvino.ConstOutput represents port/node output." assert node.__doc__ == exptected_string @@ -156,4 +156,4 @@ def test_deepcopy(): output_node = node.outputs()[0] with pytest.raises(TypeError) as e: deepcopy(output_node) - assert "Cannot deepcopy 'openvino.runtime.Output' object." in str(e) + assert "Cannot deepcopy 'openvino.Output' object." in str(e) diff --git a/src/bindings/python/tests/test_runtime/test_sync_infer_request.py b/src/bindings/python/tests/test_runtime/test_sync_infer_request.py index 3f8947598261c3..192823086d236a 100644 --- a/src/bindings/python/tests/test_runtime/test_sync_infer_request.py +++ b/src/bindings/python/tests/test_runtime/test_sync_infer_request.py @@ -591,7 +591,7 @@ def test_convert_infer_request(device): res = request.infer(inputs) with pytest.raises(TypeError) as e: deepcopy(res) - assert "Cannot deepcopy 'openvino.runtime.ConstOutput' object." in str(e) + assert "Cannot deepcopy 'openvino.ConstOutput' object." in str(e) @pytest.mark.parametrize("share_inputs", [True, False])