diff --git a/src/bindings/python/src/openvino/__init__.pyi b/src/bindings/python/src/openvino/__init__.pyi index 9ae50325384126..df9194f058ce71 100644 --- a/src/bindings/python/src/openvino/__init__.pyi +++ b/src/bindings/python/src/openvino/__init__.pyi @@ -63,13 +63,13 @@ from openvino._pyopenvino import Type from openvino._pyopenvino import VAContext from openvino._pyopenvino import VASurfaceTensor from openvino._pyopenvino import Version -from openvino._pyopenvino import get_batch -from openvino._pyopenvino import get_version from openvino._pyopenvino import layout_helpers -from openvino._pyopenvino import save_model -from openvino._pyopenvino import serialize -from openvino._pyopenvino import set_batch -from openvino._pyopenvino import shutdown +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_batch +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import save_model +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import serialize +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import set_batch +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import shutdown from openvino.package_utils import LazyLoader from openvino.package_utils import _add_openvino_libs_to_search_path from openvino.tools.ovc.convert import convert_model diff --git a/src/bindings/python/src/openvino/_ov_api.pyi b/src/bindings/python/src/openvino/_ov_api.pyi index 43dc15e82a8afc..796ad1614e3aed 100644 --- a/src/bindings/python/src/openvino/_ov_api.pyi +++ b/src/bindings/python/src/openvino/_ov_api.pyi @@ -505,7 +505,7 @@ class Model: def __init__(self: openvino._pyopenvino.Model, other: openvino._pyopenvino.Model) -> None: ... @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], sinks: list[openvino._pyopenvino.Node], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], sinks: collections.abc.Sequence[openvino._pyopenvino.Node], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -519,7 +519,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -531,7 +531,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Node], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Node], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -543,7 +543,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, result: openvino._pyopenvino.Node, parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, result: openvino._pyopenvino.Node, parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -555,7 +555,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -567,7 +567,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], sinks: list[openvino._pyopenvino.Node], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], sinks: collections.abc.Sequence[openvino._pyopenvino.Node], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -581,7 +581,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], sinks: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], sinks: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -595,7 +595,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], sinks: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], sinks: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -611,7 +611,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], sinks: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], sinks: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -625,7 +625,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], sinks: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], sinks: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -641,7 +641,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], sinks: list[openvino._pyopenvino.Node], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], sinks: collections.abc.Sequence[openvino._pyopenvino.Node], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -657,7 +657,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], sinks: list[openvino._pyopenvino.Node], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], sinks: collections.abc.Sequence[openvino._pyopenvino.Node], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -671,7 +671,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.op.Result], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.op.Result], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -685,7 +685,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self: openvino._pyopenvino.Model, results: list[openvino._pyopenvino.Output], parameters: list[openvino._pyopenvino.op.Parameter], variables: list[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: + def __init__(self: openvino._pyopenvino.Model, results: collections.abc.Sequence[openvino._pyopenvino.Output], parameters: collections.abc.Sequence[openvino._pyopenvino.op.Parameter], variables: collections.abc.Sequence[openvino._pyopenvino.op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model diff --git a/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi b/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi index f1a08e2ffbf018..97d46b09bb794d 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi @@ -9,6 +9,7 @@ from . import preprocess from . import properties from . import util from __future__ import annotations +import collections.abc import datetime import numpy import typing @@ -20,14 +21,14 @@ class AsyncInferQueue: """ openvino.AsyncInferQueue represents a helper that creates a pool of asynchronousInferRequests and provides synchronization functions to control flow of a simple pipeline. """ - def __getitem__(self, arg0: int) -> InferRequest: + def __getitem__(self, arg0: typing.SupportsInt) -> InferRequest: """ :param i: InferRequest id :type i: int :return: InferRequests from the pool with given id. :rtype: openvino.InferRequest """ - def __init__(self, model: CompiledModel, jobs: int = 0) -> None: + def __init__(self, model: CompiledModel, jobs: typing.SupportsInt = 0) -> None: """ Creates AsyncInferQueue. @@ -38,12 +39,12 @@ class AsyncInferQueue: :type jobs: int :rtype: openvino.AsyncInferQueue """ - def __iter__(self) -> typing.Iterator[InferRequest]: + def __iter__(self) -> collections.abc.Iterator[InferRequest]: ... def __len__(self) -> int: """ Number of InferRequests in the pool. - + :rtype: int """ def __repr__(self) -> str: @@ -67,7 +68,7 @@ class AsyncInferQueue: :return: If there is at least one free InferRequest in a pool, returns True. :rtype: bool """ - def set_callback(self, arg0: typing.Callable) -> None: + def set_callback(self, arg0: collections.abc.Callable) -> None: """ Sets unified callback on all InferRequests from queue's pool. Signature of such function should have two arguments, where @@ -139,15 +140,15 @@ class AxisSet: openvino.AxisSet wraps ov::AxisSet """ @typing.overload - def __init__(self, axes: set[int]) -> None: + def __init__(self, axes: collections.abc.Set[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, axes: list[int]) -> None: + def __init__(self, axes: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, axes: AxisSet) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... @@ -157,21 +158,21 @@ class AxisVector: """ openvino.AxisVector wraps ov::AxisVector """ - def __getitem__(self, arg0: int) -> int: + def __getitem__(self, arg0: typing.SupportsInt) -> int: ... @typing.overload - def __init__(self, axes: list[int]) -> None: + def __init__(self, axes: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, axes: AxisVector) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... class CompiledModel: """ @@ -269,7 +270,7 @@ class CompiledModel: :rtype: openvino.ConstOutput """ @typing.overload - def input(self, index: int) -> ConstOutput: + def input(self, index: typing.SupportsInt) -> ConstOutput: """ Gets input of a compiled model identified by an index. If the input with given index is not found, this method throws an exception. @@ -300,7 +301,7 @@ class CompiledModel: :rtype: openvino.ConstOutput """ @typing.overload - def output(self, index: int) -> ConstOutput: + def output(self, index: typing.SupportsInt) -> ConstOutput: """ Gets output of a compiled model identified by an index. If the output with given index is not found, this method throws an exception. @@ -329,7 +330,7 @@ class CompiledModel: e.g. caches, tensors, temporal buffers etc., when possible """ @typing.overload - def set_property(self, properties: dict[str, typing.Any]) -> None: + def set_property(self, properties: collections.abc.Mapping[str, typing.Any]) -> None: """ Sets properties for current compiled model. @@ -491,10 +492,10 @@ class ConstOutput: ... class ConversionExtension(_ConversionExtension): @typing.overload - def __init__(self, arg0: str, arg1: typing.Callable[[NodeContext], list[Output]]) -> None: + def __init__(self, arg0: str, arg1: collections.abc.Callable[[NodeContext], list[Output]]) -> None: ... @typing.overload - def __init__(self, arg0: str, arg1: typing.Callable[[NodeContext], dict[str, list[Output]]]) -> None: + def __init__(self, arg0: str, arg1: collections.abc.Callable[[NodeContext], dict[str, list[Output]]]) -> None: ... class ConversionExtensionBase(Extension): pass @@ -502,44 +503,44 @@ class Coordinate: """ openvino.Coordinate wraps ov::Coordinate """ - def __getitem__(self, arg0: int) -> int: + def __getitem__(self, arg0: typing.SupportsInt) -> int: ... @typing.overload def __init__(self, arg0: Shape) -> None: ... @typing.overload - def __init__(self, arg0: list[int]) -> None: + def __init__(self, arg0: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, arg0: Coordinate) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... class CoordinateDiff: """ openvino.CoordinateDiff wraps ov::CoordinateDiff """ - def __getitem__(self, arg0: int) -> int: + def __getitem__(self, arg0: typing.SupportsInt) -> int: ... @typing.overload - def __init__(self, arg0: list[int]) -> None: + def __init__(self, arg0: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, arg0: CoordinateDiff) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -568,7 +569,7 @@ class Core: :type extension: openvino.Extension """ @typing.overload - def add_extension(self, extensions: list[Extension]) -> None: + def add_extension(self, extensions: collections.abc.Sequence[Extension]) -> None: """ Registers extensions to a Core object. @@ -584,7 +585,7 @@ class Core: :type custom_op: type[openvino.Op] """ @typing.overload - def compile_model(self, model: Model, device_name: str, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model: Model, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Creates a compiled model from a source model object. Users can create as many compiled models as they need, and use them simultaneously @@ -602,7 +603,7 @@ class Core: :rtype: openvino.CompiledModel """ @typing.overload - def compile_model(self, model: Model, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model: Model, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Creates and loads a compiled model from a source model to the default OpenVINO device selected by AUTO plugin. Users can create as many compiled models as they need, and use @@ -618,7 +619,7 @@ class Core: :rtype: openvino.CompiledModel """ @typing.overload - def compile_model(self, model_path: typing.Any, device_name: str, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model_path: typing.Any, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Reads model and creates a compiled model from IR / ONNX / PDPD / TF and TFLite file. This can be more efficient than using read_model + compile_model(model_in_memory_object) flow, @@ -636,7 +637,7 @@ class Core: :rtype: openvino.CompiledModel """ @typing.overload - def compile_model(self, model_buffer: typing.Any, weight_buffer: typing.Any, device_name: str, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model_buffer: typing.Any, weight_buffer: typing.Any, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Create a compiled model from IR model buffer and weight buffer in memory. This can be more efficient than using read_model + compile_model(model_in_memory_object) flow, @@ -656,7 +657,7 @@ class Core: :rtype: openvino.CompiledModel """ @typing.overload - def compile_model(self, model_path: typing.Any, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model_path: typing.Any, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Reads model and creates a compiled model from IR / ONNX / PDPD / TF and TFLite file with device selected by AUTO plugin. This can be more efficient than using read_model + compile_model(model_in_memory_object) flow, @@ -672,7 +673,7 @@ class Core: :rtype: openvino.CompiledModel """ @typing.overload - def compile_model(self, model: Model, context: RemoteContext, properties: dict[str, typing.Any]) -> CompiledModel: + def compile_model(self, model: Model, context: RemoteContext, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Creates a compiled model from a source model within a specified remote context. @@ -687,7 +688,7 @@ class Core: :return: A compiled model. :rtype: openvino.CompiledModel """ - def create_context(self, device_name: str, properties: dict[str, typing.Any]) -> RemoteContext: + def create_context(self, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> RemoteContext: """ Creates a new remote shared context object on the specified accelerator device using specified plugin-specific low-level device API parameters. @@ -721,7 +722,7 @@ class Core: :rtype: openvino.RemoteContext """ @typing.overload - def get_property(self, device_name: str, name: str, arguments: dict[str, typing.Any]) -> typing.Any: + def get_property(self, device_name: str, name: str, arguments: collections.abc.Mapping[str, typing.Any]) -> typing.Any: """ Gets properties dedicated to device behaviour. @@ -765,7 +766,7 @@ class Core: :return: Plugin version information. :rtype: dict[str, openvino.Version] """ - def import_model(self, model_stream: typing.Any, device_name: str, properties: dict[str, typing.Any]) -> CompiledModel: + def import_model(self, model_stream: typing.Any, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> CompiledModel: """ Imports a compiled model from a previously exported one. @@ -798,7 +799,7 @@ class Core: new_compiled = core.import_model(user_stream, "CPU") """ - def query_model(self, model: Model, device_name: str, properties: dict[str, typing.Any] = {}) -> dict[str, str]: + def query_model(self, model: Model, device_name: str, properties: collections.abc.Mapping[str, typing.Any] = {}) -> dict[str, str]: """ Query device if it supports specified model with specified properties. @@ -828,7 +829,7 @@ class Core: :rtype: openvino.Model """ @typing.overload - def read_model(self, model: str, weights: str = '', config: dict[str, typing.Any] = {}) -> Model: + def read_model(self, model: str, weights: str = '', config: collections.abc.Mapping[str, typing.Any] = {}) -> Model: """ Reads models from IR / ONNX / PDPD / TF and TFLite formats. @@ -865,7 +866,7 @@ class Core: :rtype: openvino.Model """ @typing.overload - def read_model(self, model: typing.Any, weights: typing.Any = None, config: dict[str, typing.Any] = {}) -> Model: + def read_model(self, model: typing.Any, weights: typing.Any = None, config: collections.abc.Mapping[str, typing.Any] = {}) -> Model: """ Reads models from IR / ONNX / PDPD / TF and TFLite formats. @@ -900,7 +901,7 @@ class Core: :type device_name: str """ @typing.overload - def register_plugin(self, plugin_name: str, device_name: str, config: dict[str, typing.Any]) -> None: + def register_plugin(self, plugin_name: str, device_name: str, config: collections.abc.Mapping[str, typing.Any]) -> None: """ Register a new device and plugin which enable this device inside OpenVINO Runtime. @@ -923,7 +924,7 @@ class Core: :type xml_config_file: str """ @typing.overload - def set_property(self, properties: dict[str, typing.Any]) -> None: + def set_property(self, properties: collections.abc.Mapping[str, typing.Any]) -> None: """ Sets properties. @@ -939,7 +940,7 @@ class Core: :type property: tuple[str, typing.Any] """ @typing.overload - def set_property(self, device_name: str, properties: dict[str, typing.Any]) -> None: + def set_property(self, device_name: str, properties: collections.abc.Mapping[str, typing.Any]) -> None: """ Sets properties for the device. @@ -986,10 +987,9 @@ class DescriptorTensor: """ openvino.descriptor.Tensor wraps ov::descriptor::Tensor """ - names: set[str] def __repr__(self) -> str: ... - def add_names(self, names: set[str]) -> None: + def add_names(self, names: collections.abc.Set[str]) -> None: """ Adds names for tensor. @@ -1066,7 +1066,7 @@ class DescriptorTensor: :param lower_bound: The lower bound value. :type lower_bound: openvino.Tensor """ - def set_names(self, names: set[str]) -> None: + def set_names(self, names: collections.abc.Set[str]) -> None: """ Set names for tensor. @@ -1080,7 +1080,7 @@ class DescriptorTensor: :param upper_bound: Sets the upper bound value. :type upper_bound: openvino.Tensor """ - def set_value_symbol(self, value_symbol: list[Symbol]) -> None: + def set_value_symbol(self, value_symbol: collections.abc.Sequence[Symbol]) -> None: """ Sets the value symbol of the tensor. @@ -1094,6 +1094,12 @@ class DescriptorTensor: def element_type(self) -> Type: ... @property + def names(self) -> set[str]: + ... + @names.setter + def names(self, arg1: collections.abc.Set[str]) -> None: + ... + @property def partial_shape(self) -> PartialShape: ... @property @@ -1117,13 +1123,13 @@ class Dimension: def __eq__(self, arg0: Dimension) -> bool: ... @typing.overload - def __eq__(self, arg0: int) -> bool: + def __eq__(self, arg0: typing.SupportsInt) -> bool: ... @typing.overload def __init__(self) -> None: ... @typing.overload - def __init__(self, dimension: int) -> None: + def __init__(self, dimension: typing.SupportsInt) -> None: """ Construct a static dimension. @@ -1131,7 +1137,7 @@ class Dimension: :type dimension: int """ @typing.overload - def __init__(self, min_dimension: int, max_dimension: int) -> None: + def __init__(self, min_dimension: typing.SupportsInt, max_dimension: typing.SupportsInt) -> None: """ Construct a dynamic dimension with bounded range. @@ -1338,7 +1344,7 @@ class FrontEnd: :type extension: Extension """ @typing.overload - def add_extension(self, arg0: list[Extension]) -> None: + def add_extension(self, arg0: collections.abc.Sequence[Extension]) -> None: """ Add extensions defined by objects inheriting from Extension used in order to extend capabilities of Frontend. @@ -1505,7 +1511,7 @@ class InferRequest: :rtype: openvino.CompiledModel """ @typing.overload - def get_input_tensor(self, index: int) -> Tensor: + def get_input_tensor(self, index: typing.SupportsInt) -> Tensor: """ Gets input tensor of InferRequest. @@ -1526,7 +1532,7 @@ class InferRequest: :rtype: openvino.Tensor """ @typing.overload - def get_output_tensor(self, index: int) -> Tensor: + def get_output_tensor(self, index: typing.SupportsInt) -> Tensor: """ Gets output tensor of InferRequest. @@ -1628,7 +1634,7 @@ class InferRequest: Resets all internal variable states for relevant infer request to a value specified as default for the corresponding `ReadValue` node """ - def set_callback(self, callback: typing.Callable, userdata: typing.Any) -> None: + def set_callback(self, callback: collections.abc.Callable, userdata: typing.Any) -> None: """ Sets a callback function that will be called on success or failure of asynchronous InferRequest. @@ -1638,7 +1644,7 @@ class InferRequest: :type userdata: Any """ @typing.overload - def set_input_tensor(self, index: int, tensor: Tensor) -> None: + def set_input_tensor(self, index: typing.SupportsInt, tensor: Tensor) -> None: """ Sets input tensor of InferRequest. @@ -1668,7 +1674,7 @@ class InferRequest: :type inputs: dict[int, openvino.Tensor] """ @typing.overload - def set_input_tensors(self, tensors: list[Tensor]) -> None: + def set_input_tensors(self, tensors: collections.abc.Sequence[Tensor]) -> None: """ Sets batch of tensors for single input data. Model input needs to have batch dimension and the number of `tensors` @@ -1680,7 +1686,7 @@ class InferRequest: :type tensors: list[openvino.Tensor] """ @typing.overload - def set_input_tensors(self, idx: int, tensors: list[Tensor]) -> None: + def set_input_tensors(self, idx: typing.SupportsInt, tensors: collections.abc.Sequence[Tensor]) -> None: """ Sets batch of tensors for single input data to infer by index. Model input needs to have batch dimension and the number of `tensors` @@ -1693,7 +1699,7 @@ class InferRequest: Total size of tensors needs to match with input's size. """ @typing.overload - def set_output_tensor(self, index: int, tensor: Tensor) -> None: + def set_output_tensor(self, index: typing.SupportsInt, tensor: Tensor) -> None: """ Sets output tensor of InferRequest. @@ -1773,7 +1779,7 @@ class InferRequest: :type inputs: dict[Union[int, str, openvino.ConstOutput], openvino.Tensor] """ @typing.overload - def set_tensors(self, tensor_name: str, tensors: list[Tensor]) -> None: + def set_tensors(self, tensor_name: str, tensors: collections.abc.Sequence[Tensor]) -> None: """ Sets batch of tensors for input data to infer by tensor name. Model input needs to have batch dimension and the number of tensors needs to be @@ -1789,7 +1795,7 @@ class InferRequest: :type tensors: list[openvino.Tensor] """ @typing.overload - def set_tensors(self, port: ConstOutput, tensors: list[Tensor]) -> None: + def set_tensors(self, port: ConstOutput, tensors: collections.abc.Sequence[Tensor]) -> None: """ Sets batch of tensors for input data to infer by tensor name. Model input needs to have batch dimension and the number of tensors needs to be @@ -1840,12 +1846,12 @@ class InferRequest: """ def wait(self) -> None: """ - Waits for the result to become available. + Waits for the result to become available. Blocks until the result becomes available. GIL is released while running this function. """ - def wait_for(self, timeout: int) -> bool: + def wait_for(self, timeout: typing.SupportsInt) -> bool: """ Waits for the result to become available. Blocks until specified timeout has elapsed or @@ -1869,7 +1875,7 @@ class InferRequest: def latency(self) -> float: """ Gets latency of this InferRequest. - + :rtype: float """ @property @@ -2044,7 +2050,7 @@ class InputModel: :param new_name: Optional new name assigned to this output place. :type new_name: str """ - def extract_subgraph(self, inputs: list[Place], outputs: list[Place]) -> None: + def extract_subgraph(self, inputs: collections.abc.Sequence[Place], outputs: collections.abc.Sequence[Place]) -> None: """ Leaves only subgraph that are defined by new inputs and new outputs. @@ -2099,7 +2105,7 @@ class InputModel: :return: Partial shape for this place. :rtype: openvino.PartialShape """ - def get_place_by_input_index(self, input_idx: int) -> Place: + def get_place_by_input_index(self, input_idx: typing.SupportsInt) -> Place: """ Returns a tensor place by an input index. @@ -2118,7 +2124,7 @@ class InputModel: :return: Place representing operation. :rtype: openvino.frontend.Place """ - def get_place_by_operation_name_and_input_port(self, operation_name: str, input_port_index: int) -> Place: + def get_place_by_operation_name_and_input_port(self, operation_name: str, input_port_index: typing.SupportsInt) -> Place: """ Returns an input port place by operation name and appropriate port index. @@ -2129,7 +2135,7 @@ class InputModel: :return: Place representing input port of operation. :rtype: openvino.frontend.Place """ - def get_place_by_operation_name_and_output_port(self, operation_name: str, output_port_index: int) -> Place: + def get_place_by_operation_name_and_output_port(self, operation_name: str, output_port_index: typing.SupportsInt) -> Place: """ Returns an output port place by operation name and appropriate port index. @@ -2150,7 +2156,7 @@ class InputModel: :return: Tensor place corresponding to specified tensor name. :rtype: openvino.frontend.Place """ - def override_all_inputs(self, inputs: list[Place]) -> None: + def override_all_inputs(self, inputs: collections.abc.Sequence[Place]) -> None: """ Modifies the graph to use new inputs instead of existing ones. New inputs should completely satisfy all existing outputs. @@ -2158,7 +2164,7 @@ class InputModel: :param inputs: Array of new input places. :type inputs: list[openvino.frontend.Place] """ - def override_all_outputs(self, outputs: list[Place]) -> None: + def override_all_outputs(self, outputs: collections.abc.Sequence[Place]) -> None: """ Replaces all existing outputs with new ones removing all data flow that is not required for new outputs. @@ -2183,7 +2189,7 @@ class InputModel: :param type: New element type. :type type: openvino.Type """ - def set_name_for_dimension(self, place: Place, dim_index: int, dim_name: str) -> None: + def set_name_for_dimension(self, place: Place, dim_index: typing.SupportsInt, dim_name: str) -> None: """ Set name for a particular dimension of a place (e.g. batch dimension). @@ -2286,7 +2292,7 @@ class Model: def __init__(self, other: Model) -> None: ... @typing.overload - def __init__(self, results: list[op.Result], sinks: list[Node], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], sinks: collections.abc.Sequence[Node], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -2300,7 +2306,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[op.Result], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -2312,7 +2318,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Node], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Node], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -2324,7 +2330,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, result: Node, parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, result: Node, parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model. @@ -2336,7 +2342,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2348,7 +2354,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], sinks: list[Node], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], sinks: collections.abc.Sequence[Node], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2362,7 +2368,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], sinks: list[Output], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], sinks: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2376,7 +2382,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], sinks: list[Output], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], sinks: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2392,7 +2398,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[op.Result], sinks: list[Output], parameters: list[op.Parameter], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], sinks: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2406,7 +2412,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[op.Result], sinks: list[Output], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], sinks: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2422,7 +2428,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[op.Result], sinks: list[Node], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], sinks: collections.abc.Sequence[Node], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2438,7 +2444,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], sinks: list[Node], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], sinks: collections.abc.Sequence[Node], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2452,7 +2458,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[op.Result], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[op.Result], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2466,7 +2472,7 @@ class Model: :type name: str """ @typing.overload - def __init__(self, results: list[Output], parameters: list[op.Parameter], variables: list[op.util.Variable], name: str = '') -> None: + def __init__(self, results: collections.abc.Sequence[Output], parameters: collections.abc.Sequence[op.Parameter], variables: collections.abc.Sequence[op.util.Variable], name: str = '') -> None: """ Create user-defined Model which is a representation of a model @@ -2482,7 +2488,7 @@ class Model: def _get_raw_address(self) -> int: """ Returns a raw address of the Model object from C++. - + Use this function in order to compare underlying C++ addresses instead of using `__eq__` in Python. :return: a raw address of the Model object. @@ -2490,7 +2496,7 @@ class Model: """ def add_outputs(self, outputs: typing.Any) -> list[Output]: ... - def add_parameters(self, parameters: list[op.Parameter]) -> None: + def add_parameters(self, parameters: collections.abc.Sequence[op.Parameter]) -> None: """ Add new Parameter nodes to the list. @@ -2504,10 +2510,10 @@ class Model: :param parameter: new Parameter nodes. :type parameter: list[op.Parameter] """ - def add_results(self, results: list[op.Result]) -> None: + def add_results(self, results: collections.abc.Sequence[op.Result]) -> None: """ Add new Result nodes to the list. - + Method doesn't validate graph, it should be done manually after all changes. :param results: new Result nodes. @@ -2516,16 +2522,16 @@ class Model: def add_sinks(self, sinks: list) -> None: """ Add new sink nodes to the list. - + Method doesn't validate graph, it should be done manually after all changes. :param sinks: new sink nodes. :type sinks: list[openvino.Node] """ - def add_variables(self, variables: list[op.util.Variable]) -> None: + def add_variables(self, variables: collections.abc.Sequence[op.util.Variable]) -> None: """ - Add new variables to the list. - + Add new variables to the list. + Method doesn't validate graph, it should be done manually after all changes. :param variables: new variables to add. @@ -2537,7 +2543,7 @@ class Model: :return: A copy of self. :rtype: openvino.Model """ - def evaluate(self, output_tensors: list[Tensor], input_tensors: list[Tensor], evaluation_context: RTMap = ...) -> bool: + def evaluate(self, output_tensors: collections.abc.Sequence[Tensor], input_tensors: collections.abc.Sequence[Tensor], evaluation_context: RTMap = ...) -> bool: """ Evaluate the model on inputs, putting results in outputs @@ -2581,7 +2587,7 @@ class Model: :return: list of sorted Nodes representing ops used in model. :rtype: list[openvino.Node] """ - def get_output_element_type(self, index: int) -> Type: + def get_output_element_type(self, index: typing.SupportsInt) -> Type: """ Return the element type of output i @@ -2590,7 +2596,7 @@ class Model: :return: Type object of output i :rtype: openvino.Type """ - def get_output_op(self, index: int) -> Node: + def get_output_op(self, index: typing.SupportsInt) -> Node: """ Return the op that generates output i @@ -2599,7 +2605,7 @@ class Model: :return: Node object that generates output i :rtype: openvino.Node """ - def get_output_partial_shape(self, index: int) -> PartialShape: + def get_output_partial_shape(self, index: typing.SupportsInt) -> PartialShape: """ Return the partial shape of element i @@ -2608,7 +2614,7 @@ class Model: :return: PartialShape object of element i :rtype: openvino.PartialShape """ - def get_output_shape(self, index: int) -> Shape: + def get_output_shape(self, index: typing.SupportsInt) -> Shape: """ Return the shape of element i @@ -2768,7 +2774,7 @@ class Model: def get_variable_by_id(self, arg0: str) -> op.util.Variable: """ Return a variable by specified variable_id. - + :param variable_id: a variable id to get variable node. :type variable_id: str :return: a variable node. @@ -2807,7 +2813,7 @@ class Model: def input(self) -> Output: ... @typing.overload - def input(self, index: int) -> Output: + def input(self, index: typing.SupportsInt) -> Output: ... @typing.overload def input(self, tensor_name: str) -> Output: @@ -2816,7 +2822,7 @@ class Model: def input(self) -> ConstOutput: ... @typing.overload - def input(self, index: int) -> ConstOutput: + def input(self, index: typing.SupportsInt) -> ConstOutput: ... @typing.overload def input(self, tensor_name: str) -> ConstOutput: @@ -2832,7 +2838,7 @@ class Model: def output(self) -> Output: ... @typing.overload - def output(self, index: int) -> Output: + def output(self, index: typing.SupportsInt) -> Output: ... @typing.overload def output(self, tensor_name: str) -> Output: @@ -2841,14 +2847,14 @@ class Model: def output(self) -> ConstOutput: ... @typing.overload - def output(self, index: int) -> ConstOutput: + def output(self, index: typing.SupportsInt) -> ConstOutput: ... @typing.overload def output(self, tensor_name: str) -> ConstOutput: ... def remove_parameter(self, parameter: op.Parameter) -> None: """ - Delete Parameter node from the list of parameters. Method will not delete node from graph. + Delete Parameter node from the list of parameters. Method will not delete node from graph. You need to replace Parameter with other operation manually. Attention: Indexing of parameters can be changed. @@ -2884,7 +2890,7 @@ class Model: :param variable: Variable to delete. :type variable: op.util.Variable """ - def replace_parameter(self, parameter_index: int, parameter: op.Parameter) -> None: + def replace_parameter(self, parameter_index: typing.SupportsInt, parameter: op.Parameter) -> None: """ Replace the `parameter_index` parameter of the model with `parameter` @@ -3186,7 +3192,7 @@ class Node: openvino.Node wraps ov::Node """ friendly_name: str - def __add__(self, right: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __add__(self, right: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: """ Return node which applies f(A,B) = A+B to the input nodes element-wise. @@ -3197,9 +3203,9 @@ class Node: """ def __array_ufunc__(self, arg0: typing.Any, arg1: str, *args, **kwargs) -> typing.Any: ... - def __getattr__(self, arg0: str) -> typing.Callable: + def __getattr__(self, arg0: str) -> collections.abc.Callable: ... - def __mul__(self, right: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __mul__(self, right: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: """ Return node which applies f(A,B) = A*B to the input nodes element-wise. @@ -3208,17 +3214,17 @@ class Node: :return: The node performing element-wise multiplication. :rtype: openvino.Node """ - def __radd__(self, arg0: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __radd__(self, arg0: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: ... def __repr__(self) -> str: ... - def __rmul__(self, arg0: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __rmul__(self, arg0: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: ... - def __rsub__(self, arg0: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __rsub__(self, arg0: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: ... - def __rtruediv__(self, arg0: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __rtruediv__(self, arg0: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: ... - def __sub__(self, right: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __sub__(self, right: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: """ Return node which applies f(A,B) = A-B to the input nodes element-wise. @@ -3227,7 +3233,7 @@ class Node: :return: The node performing element-wise subtraction. :rtype: openvino.Node """ - def __truediv__(self, right: Node | int | float | numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> Node: + def __truediv__(self, right: openvino._pyopenvino.Node | typing.SupportsInt | typing.SupportsFloat | numpy.ndarray) -> Node: """ Return node which applies f(A,B) = A/B to the input nodes element-wise. @@ -3239,7 +3245,7 @@ class Node: def constructor_validate_and_infer_types(self) -> None: ... @typing.overload - def evaluate(self, output_values: list[Tensor], input_values: list[Tensor], evaluationContext: RTMap) -> bool: + def evaluate(self, output_values: collections.abc.Sequence[Tensor], input_values: collections.abc.Sequence[Tensor], evaluationContext: RTMap) -> bool: """ Evaluate the node on inputs, putting results in outputs @@ -3253,7 +3259,7 @@ class Node: :rtype: bool """ @typing.overload - def evaluate(self, output_values: list[Tensor], input_values: list[Tensor]) -> bool: + def evaluate(self, output_values: collections.abc.Sequence[Tensor], input_values: collections.abc.Sequence[Tensor]) -> bool: """ Evaluate the function on inputs, putting results in outputs @@ -3281,7 +3287,7 @@ class Node: :return: Friendly name of the node. :rtype: str """ - def get_input_element_type(self, index: int) -> Type: + def get_input_element_type(self, index: typing.SupportsInt) -> Type: """ Returns the element type for input index @@ -3290,7 +3296,7 @@ class Node: :return: Type of the input index :rtype: openvino.Type """ - def get_input_partial_shape(self, index: int) -> PartialShape: + def get_input_partial_shape(self, index: typing.SupportsInt) -> PartialShape: """ Returns the partial shape for input index @@ -3299,7 +3305,7 @@ class Node: :return: PartialShape of the input index :rtype: openvino.PartialShape """ - def get_input_shape(self, index: int) -> Shape: + def get_input_shape(self, index: typing.SupportsInt) -> Shape: """ Returns the shape for input index @@ -3315,7 +3321,7 @@ class Node: :return: Number of inputs. :rtype: int """ - def get_input_tensor(self, index: int) -> DescriptorTensor: + def get_input_tensor(self, index: typing.SupportsInt) -> DescriptorTensor: """ Returns the tensor for the node's input with index i @@ -3339,7 +3345,7 @@ class Node: :return: Unique name of the node. :rtype: str """ - def get_output_element_type(self, index: int) -> Type: + def get_output_element_type(self, index: typing.SupportsInt) -> Type: """ Returns the element type for output index @@ -3348,7 +3354,7 @@ class Node: :return: Type of the output index :rtype: openvino.Type """ - def get_output_partial_shape(self, index: int) -> PartialShape: + def get_output_partial_shape(self, index: typing.SupportsInt) -> PartialShape: """ Returns the partial shape for output index @@ -3357,7 +3363,7 @@ class Node: :return: PartialShape of the output index :rtype: openvino.PartialShape """ - def get_output_shape(self, index: int) -> Shape: + def get_output_shape(self, index: typing.SupportsInt) -> Shape: """ Returns the shape for output index @@ -3373,7 +3379,7 @@ class Node: :return: Number of outputs. :rtype: int """ - def get_output_tensor(self, index: int) -> DescriptorTensor: + def get_output_tensor(self, index: typing.SupportsInt) -> DescriptorTensor: """ Returns the tensor for output index @@ -3398,7 +3404,7 @@ class Node: :return: String representing Type's name. :rtype: str """ - def input(self, input_index: int) -> Input: + def input(self, input_index: typing.SupportsInt) -> Input: """ A handle to the input_index input of this node. @@ -3407,7 +3413,7 @@ class Node: :return: Input of this node. :rtype: openvino.Input """ - def input_value(self, index: int) -> Output: + def input_value(self, index: typing.SupportsInt) -> Output: """ Returns input of the node with index i @@ -3430,7 +3436,7 @@ class Node: :return: list of node's inputs. :rtype: list[openvino.Input] """ - def output(self, output_index: int) -> Output: + def output(self, output_index: typing.SupportsInt) -> Output: """ A handle to the output_index output of this node. @@ -3446,13 +3452,13 @@ class Node: :return: list of node's outputs. :rtype: list[openvino.Output] """ - def set_argument(self, arg0: int, arg1: Output) -> None: + def set_argument(self, arg0: typing.SupportsInt, arg1: Output) -> None: ... @typing.overload - def set_arguments(self, arg0: list[Node]) -> None: + def set_arguments(self, arg0: collections.abc.Sequence[Node]) -> None: ... @typing.overload - def set_arguments(self, arg0: list[Output]) -> None: + def set_arguments(self, arg0: collections.abc.Sequence[Output]) -> None: ... def set_attribute(self, arg0: str, arg1: typing.Any) -> None: ... @@ -3465,14 +3471,14 @@ class Node: :param name: Friendly name to set. :type name: str """ - def set_output_size(self, size: int) -> None: + def set_output_size(self, size: typing.SupportsInt) -> None: """ Sets the number of outputs :param size: number of outputs. :type size: int """ - def set_output_type(self, index: int, element_type: Type, shape: PartialShape) -> None: + def set_output_type(self, index: typing.SupportsInt, element_type: Type, shape: PartialShape) -> None: """ Sets output's element type and shape. @@ -3517,13 +3523,13 @@ class NodeContext: def get_attribute(self, name: str, default_value: typing.Any = None, dtype: typing.Any = None) -> typing.Any: ... @typing.overload - def get_input(self, arg0: int) -> Output: + def get_input(self, arg0: typing.SupportsInt) -> Output: ... @typing.overload def get_input(self, arg0: str) -> Output: ... @typing.overload - def get_input(self, arg0: str, arg1: int) -> Output: + def get_input(self, arg0: str, arg1: typing.SupportsInt) -> Output: ... @typing.overload def get_input_size(self) -> int: @@ -3533,7 +3539,7 @@ class NodeContext: ... def get_op_type(self, arg0: str) -> str: ... - def get_values_from_const_input(self, idx: int, default_value: typing.Any = None, dtype: typing.Any = None) -> typing.Any: + def get_values_from_const_input(self, idx: typing.SupportsInt, default_value: typing.Any = None, dtype: typing.Any = None) -> typing.Any: ... def has_attribute(self, arg0: str) -> bool: ... @@ -3553,7 +3559,7 @@ class NodeFactory: def add_extension(self, arg0: Extension) -> None: ... @typing.overload - def add_extension(self, arg0: list[Extension]) -> None: + def add_extension(self, arg0: collections.abc.Sequence[Extension]) -> None: ... @typing.overload def add_extension(self, arg0: typing.Any) -> None: @@ -3562,7 +3568,7 @@ class NodeFactory: def create(self, arg0: str) -> Node: ... @typing.overload - def create(self, arg0: str, arg1: list[Output], arg2: dict) -> Node: + def create(self, arg0: str, arg1: collections.abc.Sequence[Output], arg2: dict) -> Node: ... class NotImplementedFailure(Exception): pass @@ -3594,7 +3600,7 @@ class OVAny: def __setitem__(self, arg0: typing.Any, arg1: str) -> None: ... @typing.overload - def __setitem__(self, arg0: typing.Any, arg1: int) -> None: + def __setitem__(self, arg0: typing.Any, arg1: typing.SupportsInt) -> None: ... def aslist(self, dtype: typing.Any = None) -> typing.Any: """ @@ -3675,7 +3681,7 @@ class Output: ... def _from_node(self: typing.Any) -> Output: ... - def add_names(self, names: set[str]) -> None: + def add_names(self, names: collections.abc.Set[str]) -> None: """ Add tensor names associated with this output. @@ -3768,7 +3774,7 @@ class Output: :param replacement: The node that is a replacement. :type replacement: openvino.Output """ - def set_names(self, names: set[str]) -> None: + def set_names(self, names: collections.abc.Set[str]) -> None: """ Set tensor names associated with this output. @@ -3831,7 +3837,7 @@ class PartialShape: """ @staticmethod @typing.overload - def dynamic(rank: int) -> PartialShape: + def dynamic(rank: typing.SupportsInt) -> PartialShape: """ Construct a PartialShape with the given rank and all dimensions are dynamic. @@ -3858,7 +3864,7 @@ class PartialShape: def __eq__(self, arg0: list) -> bool: ... @typing.overload - def __getitem__(self, arg0: int) -> Dimension: + def __getitem__(self, arg0: typing.SupportsInt) -> Dimension: ... @typing.overload def __getitem__(self, arg0: slice) -> PartialShape: @@ -3878,17 +3884,17 @@ class PartialShape: @typing.overload def __init__(self, shape: str) -> None: ... - def __iter__(self) -> typing.Iterator[Dimension]: + def __iter__(self) -> collections.abc.Iterator[Dimension]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... @typing.overload - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... @typing.overload - def __setitem__(self, arg0: int, arg1: Dimension) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: Dimension) -> None: ... def __str__(self) -> str: ... @@ -3902,7 +3908,7 @@ class PartialShape: :return: True if this shape is compatible with s, else False. :rtype: bool """ - def get_dimension(self, index: int) -> Dimension: + def get_dimension(self, index: typing.SupportsInt) -> Dimension: """ Get the dimension at specified index of a partial shape. @@ -4143,7 +4149,7 @@ class ProfilingInfo: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -4151,7 +4157,7 @@ class ProfilingInfo: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -4182,15 +4188,15 @@ class ProgressReporterExtension(Extension): def __init__(self) -> None: ... @typing.overload - def __init__(self, arg0: typing.Callable) -> None: + def __init__(self, arg0: collections.abc.Callable) -> None: ... @typing.overload - def __init__(self, arg0: typing.Callable[[float, int, int], None]) -> None: + def __init__(self, arg0: collections.abc.Callable[[typing.SupportsFloat, typing.SupportsInt, typing.SupportsInt], None]) -> None: ... @typing.overload - def __init__(self, arg0: typing.Callable[[float, int, int], None]) -> None: + def __init__(self, arg0: collections.abc.Callable[[typing.SupportsFloat, typing.SupportsInt, typing.SupportsInt], None]) -> None: ... - def report_progress(self, arg0: float, arg1: int, arg2: int) -> None: + def report_progress(self, arg0: typing.SupportsFloat, arg1: typing.SupportsInt, arg2: typing.SupportsInt) -> None: ... class RTMap: """ @@ -4206,7 +4212,7 @@ class RTMap: ... def __getitem__(self, arg0: str) -> typing.Any: ... - def __iter__(self) -> typing.Iterator[str]: + def __iter__(self) -> collections.abc.Iterator[str]: ... def __len__(self) -> int: ... @@ -4216,11 +4222,11 @@ class RTMap: def __setitem__(self, arg0: str, arg1: str) -> None: ... @typing.overload - def __setitem__(self, arg0: str, arg1: int) -> None: + def __setitem__(self, arg0: str, arg1: typing.SupportsInt) -> None: ... def items(self) -> typing.Iterator: ... - def keys(self) -> typing.Iterator[str]: + def keys(self) -> collections.abc.Iterator[str]: ... def values(self) -> typing.Iterator: ... @@ -4241,7 +4247,7 @@ class RemoteContext: :return: A tensor instance with device friendly memory. :rtype: openvino.Tensor """ - def create_tensor(self, type: Type, shape: Shape, properties: dict[str, typing.Any]) -> RemoteTensor: + def create_tensor(self, type: Type, shape: Shape, properties: collections.abc.Mapping[str, typing.Any]) -> RemoteTensor: """ Allocates memory tensor in device memory or wraps user-supplied memory handle using the specified tensor description and low-level device-specific parameters. @@ -4392,7 +4398,7 @@ class Shape: def __eq__(self, arg0: list) -> bool: ... @typing.overload - def __getitem__(self, arg0: int) -> int: + def __getitem__(self, arg0: typing.SupportsInt) -> int: ... @typing.overload def __getitem__(self, arg0: slice) -> Shape: @@ -4401,7 +4407,7 @@ class Shape: def __init__(self) -> None: ... @typing.overload - def __init__(self, axis_lengths: list[int]) -> None: + def __init__(self, axis_lengths: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, axis_lengths: Shape) -> None: @@ -4409,17 +4415,17 @@ class Shape: @typing.overload def __init__(self, shape: str) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... @typing.overload - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... @typing.overload - def __setitem__(self, arg0: int, arg1: Dimension) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: Dimension) -> None: ... def __str__(self) -> str: ... @@ -4439,21 +4445,21 @@ class Strides: @typing.overload def __eq__(self, arg0: list) -> bool: ... - def __getitem__(self, arg0: int) -> int: + def __getitem__(self, arg0: typing.SupportsInt) -> int: ... @typing.overload - def __init__(self, axis_strides: list[int]) -> None: + def __init__(self, axis_strides: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, axis_strides: Strides) -> None: ... - def __iter__(self) -> typing.Iterator[int]: + def __iter__(self) -> collections.abc.Iterator[int]: ... def __len__(self) -> int: ... def __repr__(self) -> str: ... - def __setitem__(self, arg0: int, arg1: int) -> None: + def __setitem__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -4473,14 +4479,14 @@ class Symbol: ... class TelemetryExtension(Extension): @typing.overload - def __init__(self, arg0: str, arg1: typing.Callable, arg2: typing.Callable, arg3: typing.Callable) -> None: + def __init__(self, arg0: str, arg1: collections.abc.Callable, arg2: collections.abc.Callable, arg3: collections.abc.Callable) -> None: ... @typing.overload - def __init__(self, arg0: str, arg1: typing.Callable[[str, str, str, int], None], arg2: typing.Callable[[str, str], None], arg3: typing.Callable[[str, str], None]) -> None: + def __init__(self, arg0: str, arg1: collections.abc.Callable[[str, str, str, typing.SupportsInt], None], arg2: collections.abc.Callable[[str, str], None], arg3: collections.abc.Callable[[str, str], None]) -> None: ... def send_error(self, arg0: str) -> None: ... - def send_event(self, arg0: str, arg1: str, arg2: int) -> None: + def send_event(self, arg0: str, arg1: str, arg2: typing.SupportsInt) -> None: ... def send_stack_trace(self, arg0: str) -> None: ... @@ -4535,7 +4541,7 @@ class Tensor: t = ov.Tensor(arr, ov.Shape([100, 8]), ov.Type.u1) """ @typing.overload - def __init__(self, array: numpy.ndarray[typing.Any, numpy.dtype[typing.Any]], shape: list[int], type: Type = ...) -> None: + def __init__(self, array: numpy.ndarray[typing.Any, numpy.dtype[typing.Any]], shape: collections.abc.Sequence[typing.SupportsInt], type: Type = ...) -> None: """ Another Tensor's special constructor. @@ -4577,13 +4583,13 @@ class Tensor: def __init__(self, type: Type, shape: Shape) -> None: ... @typing.overload - def __init__(self, type: Type, shape: list[int]) -> None: + def __init__(self, type: Type, shape: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, type: numpy.dtype[typing.Any], shape: list[int]) -> None: + def __init__(self, type: numpy.dtype[typing.Any], shape: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, type: typing.Any, shape: list[int]) -> None: + def __init__(self, type: typing.Any, shape: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, type: numpy.dtype[typing.Any], shape: Shape) -> None: @@ -4639,7 +4645,7 @@ class Tensor: def __init__(self, other: Tensor, begin: Coordinate, end: Coordinate) -> None: ... @typing.overload - def __init__(self, other: Tensor, begin: list[int], end: list[int]) -> None: + def __init__(self, other: Tensor, begin: collections.abc.Sequence[typing.SupportsInt], end: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload def __init__(self, image: typing.Any) -> None: @@ -4747,7 +4753,7 @@ class Tensor: Sets Tensor's shape. """ @typing.overload - def set_shape(self, arg0: list[int]) -> None: + def set_shape(self, arg0: collections.abc.Sequence[typing.SupportsInt]) -> None: """ Sets Tensor's shape. """ @@ -4804,7 +4810,7 @@ class Tensor: Tensor's shape get/set. """ @shape.setter - def shape(self, arg1: list[int]) -> None: + def shape(self, arg1: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @property def size(self) -> int: @@ -4953,7 +4959,7 @@ class Type: def type_name(self) -> str: ... class VAContext(RemoteContext): - def __init__(self, core: Core, display: capsule, target_tile_id: int = -1) -> None: + def __init__(self, core: Core, display: typing_extensions.CapsuleType, target_tile_id: typing.SupportsInt = -1) -> None: """ Constructs remote context object from valid VA display handle. @@ -4967,7 +4973,7 @@ class VAContext(RemoteContext): :return: A context instance. :rtype: openvino.VAContext """ - def create_tensor(self, type: Type, shape: Shape, surface: int, plane: int = 0) -> VASurfaceTensorWrapper: + def create_tensor(self, type: Type, shape: Shape, surface: typing.SupportsInt, plane: typing.SupportsInt = 0) -> VASurfaceTensorWrapper: """ Create remote tensor from VA surface handle. @@ -4984,7 +4990,7 @@ class VAContext(RemoteContext): :return: A remote tensor instance wrapping `VASurfaceID`. :rtype: openvino.VASurfaceTensor """ - def create_tensor_nv12(self, height: int, width: int, nv12_surface: int) -> tuple: + def create_tensor_nv12(self, height: typing.SupportsInt, width: typing.SupportsInt, nv12_surface: typing.SupportsInt) -> tuple: """ This function is used to obtain a NV12 tensor from NV12 VA decoder output. The result contains two remote tensors for Y and UV planes of the surface. @@ -5173,7 +5179,7 @@ def serialize(model: typing.Any, xml_path: typing.Any, bin_path: typing.Any = '' def set_batch(model: typing.Any, dimension: Dimension) -> None: ... @typing.overload -def set_batch(model: typing.Any, batch_size: int = -1) -> None: +def set_batch(model: typing.Any, batch_size: typing.SupportsInt = -1) -> None: ... def shutdown() -> None: """ diff --git a/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi b/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi index 8a36a8b1bab591..58dc2d54977112 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi @@ -1,5 +1,6 @@ # type: ignore from __future__ import annotations +import collections.abc import openvino._pyopenvino.op import typing """ @@ -11,12 +12,12 @@ def apply_fused_names_cleanup(model: typing.Any) -> None: def apply_low_latency_transformation(model: typing.Any, use_const_initializer: bool = True) -> None: ... @typing.overload -def apply_make_stateful_transformation(model: typing.Any, param_res_names: dict[str, str]) -> None: +def apply_make_stateful_transformation(model: typing.Any, param_res_names: collections.abc.Mapping[str, str]) -> None: ... @typing.overload -def apply_make_stateful_transformation(model: typing.Any, pairs_to_replace: list[tuple[openvino._pyopenvino.op.Parameter, openvino._pyopenvino.op.Result]]) -> None: +def apply_make_stateful_transformation(model: typing.Any, pairs_to_replace: collections.abc.Sequence[tuple[openvino._pyopenvino.op.Parameter, openvino._pyopenvino.op.Result]]) -> None: ... -def apply_moc_legacy_transformations(model: typing.Any, params_with_custom_types: list[str]) -> None: +def apply_moc_legacy_transformations(model: typing.Any, params_with_custom_types: collections.abc.Sequence[str]) -> None: ... def apply_moc_transformations(model: typing.Any, cf: bool, smart_reshape: bool = False) -> None: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/frontend.pyi b/src/bindings/python/src/openvino/_pyopenvino/frontend.pyi index c0cdbaeaa1ba8d..28dc716a498a32 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/frontend.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/frontend.pyi @@ -1,18 +1,19 @@ # type: ignore from __future__ import annotations +import collections.abc import openvino._pyopenvino import typing __all__ = ['OpExtension'] class OpExtension(openvino._pyopenvino._ConversionExtension): @typing.overload - def __init__(self, fw_type_name: str, attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, fw_type_name: str, attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... @typing.overload - def __init__(self, ov_type_name: str, fw_type_name: str, attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, ov_type_name: str, fw_type_name: str, attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... @typing.overload - def __init__(self, fw_type_name: str, in_names_vec: list[str], out_names_vec: list[str], attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, fw_type_name: str, in_names_vec: collections.abc.Sequence[str], out_names_vec: collections.abc.Sequence[str], attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... @typing.overload - def __init__(self, ov_type_name: str, fw_type_name: str, in_names_vec: list[str], out_names_vec: list[str], attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, ov_type_name: str, fw_type_name: str, in_names_vec: collections.abc.Sequence[str], out_names_vec: collections.abc.Sequence[str], attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/op/__init__.pyi b/src/bindings/python/src/openvino/_pyopenvino/op/__init__.pyi index 09f878e3167951..9ee3dd2a4702f5 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/op/__init__.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/op/__init__.pyi @@ -1,6 +1,7 @@ # type: ignore from . import util from __future__ import annotations +import collections.abc import numpy import openvino._pyopenvino import typing @@ -19,40 +20,40 @@ class Constant(openvino._pyopenvino.Node): def __init__(self, tensor: openvino._pyopenvino.Tensor, shared_memory: bool = True) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[str]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[str]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[...]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[...]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[float]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsFloat]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[float]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsFloat]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... @typing.overload - def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: list[int]) -> None: + def __init__(self, arg0: openvino._pyopenvino.Type, arg1: openvino._pyopenvino.Shape, arg2: collections.abc.Sequence[typing.SupportsInt]) -> None: ... def __repr__(self) -> str: ... @@ -170,9 +171,9 @@ class Result(openvino._pyopenvino.Node): ... def get_layout(self) -> openvino._pyopenvino.Layout: ... - def get_output_element_type(self, index: int) -> openvino._pyopenvino.Type: + def get_output_element_type(self, index: typing.SupportsInt) -> openvino._pyopenvino.Type: ... - def get_output_partial_shape(self, index: int) -> openvino._pyopenvino.PartialShape: + def get_output_partial_shape(self, index: typing.SupportsInt) -> openvino._pyopenvino.PartialShape: ... def set_layout(self, layout: openvino._pyopenvino.Layout) -> None: ... @@ -180,7 +181,7 @@ class _PagedAttentionExtension(openvino._pyopenvino.Node): """ Experimental extention for PagedAttention operation. Use with care: no backward compatibility is guaranteed in future releases. """ - def __init__(self, arg0: list[openvino._pyopenvino.Output]) -> None: + def __init__(self, arg0: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: ... class assign(openvino._pyopenvino.Node): """ @@ -240,7 +241,7 @@ class if_op(openvino._pyopenvino.Node): :return: else_body as Model object. :rtype: openvino.Model """ - def get_function(self, index: int) -> typing.Any: + def get_function(self, index: typing.SupportsInt) -> typing.Any: """ Gets internal sub-graph by index in MultiSubGraphOp. @@ -250,7 +251,7 @@ class if_op(openvino._pyopenvino.Node): :return: Model with sub-graph. :rtype: openvino.Model """ - def get_input_descriptions(self, index: int) -> list: + def get_input_descriptions(self, index: typing.SupportsInt) -> list: """ Gets list with connections between operation inputs and internal sub-graph parameters. @@ -262,7 +263,7 @@ class if_op(openvino._pyopenvino.Node): openvino.op.util.InvariantInputDescription, openvino.op.util.SliceInputDescription]] """ - def get_output_descriptions(self, index: int) -> list: + def get_output_descriptions(self, index: typing.SupportsInt) -> list: """ Gets list with connections between operation outputs and internal sub-graph parameters. @@ -289,7 +290,7 @@ class if_op(openvino._pyopenvino.Node): :rtype: None """ - def set_function(self, index: int, func: typing.Any) -> None: + def set_function(self, index: typing.SupportsInt, func: typing.Any) -> None: """ Adds sub-graph to MultiSubGraphOp. @@ -316,7 +317,7 @@ class if_op(openvino._pyopenvino.Node): :rtype: None """ - def set_input_descriptions(self, index: int, inputs: list) -> None: + def set_input_descriptions(self, index: typing.SupportsInt, inputs: list) -> None: """ Sets list with connections between operation inputs and internal sub-graph parameters. @@ -343,7 +344,7 @@ class if_op(openvino._pyopenvino.Node): :return: output from operation. :rtype: openvino.Output """ - def set_output_descriptions(self, index: int, outputs: list) -> None: + def set_output_descriptions(self, index: typing.SupportsInt, outputs: list) -> None: """ Sets list with connections between operation outputs and internal sub-graph parameters. @@ -380,13 +381,13 @@ class loop(openvino._pyopenvino.Node): ... def __repr__(self) -> str: ... - def get_concatenated_slices(self, value: openvino._pyopenvino.Output, start: int, stride: int, part_size: int, end: int, axis: int) -> openvino._pyopenvino.Output: + def get_concatenated_slices(self, value: openvino._pyopenvino.Output, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> openvino._pyopenvino.Output: ... def get_function(self) -> typing.Any: ... def get_input_descriptions(self) -> list: ... - def get_iter_value(self, body_value: openvino._pyopenvino.Output, iteration: int = -1) -> openvino._pyopenvino.Output: + def get_iter_value(self, body_value: openvino._pyopenvino.Output, iteration: typing.SupportsInt = -1) -> openvino._pyopenvino.Output: ... def get_num_iterations(self) -> int: ... @@ -404,7 +405,7 @@ class loop(openvino._pyopenvino.Node): ... def set_output_descriptions(self, outputs: list) -> None: ... - def set_sliced_input(self, parameter: Parameter, value: openvino._pyopenvino.Output, start: int, stride: int, part_size: int, end: int, axis: int) -> None: + def set_sliced_input(self, parameter: Parameter, value: openvino._pyopenvino.Output, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> None: ... def set_special_body_ports(self, special_body_ports: list) -> None: ... @@ -440,13 +441,13 @@ class tensor_iterator(openvino._pyopenvino.Node): ... def get_body(self) -> typing.Any: ... - def get_concatenated_slices(self, value: openvino._pyopenvino.Output, start: int, stride: int, part_size: int, end: int, axis: int) -> openvino._pyopenvino.Output: + def get_concatenated_slices(self, value: openvino._pyopenvino.Output, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> openvino._pyopenvino.Output: ... def get_function(self) -> typing.Any: ... def get_input_descriptions(self) -> list: ... - def get_iter_value(self, body_value: openvino._pyopenvino.Output, iteration: int = -1) -> openvino._pyopenvino.Output: + def get_iter_value(self, body_value: openvino._pyopenvino.Output, iteration: typing.SupportsInt = -1) -> openvino._pyopenvino.Output: ... def get_num_iterations(self) -> int: ... @@ -464,5 +465,5 @@ class tensor_iterator(openvino._pyopenvino.Node): ... def set_output_descriptions(self, outputs: list) -> None: ... - def set_sliced_input(self, parameter: Parameter, value: openvino._pyopenvino.Output, start: int, stride: int, part_size: int, end: int, axis: int) -> None: + def set_sliced_input(self, parameter: Parameter, value: openvino._pyopenvino.Output, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> None: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/op/util.pyi b/src/bindings/python/src/openvino/_pyopenvino/op/util.pyi index d858d2e858f61d..8c5467717ad37a 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/op/util.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/op/util.pyi @@ -31,7 +31,7 @@ class BodyOutputDescription(OutputDescription): def __init__(self) -> None: ... @typing.overload - def __init__(self, body_value_index: int, output_index: int, iteration: int = -1) -> None: + def __init__(self, body_value_index: typing.SupportsInt, output_index: typing.SupportsInt, iteration: typing.SupportsInt = -1) -> None: ... def __repr__(self) -> str: ... @@ -56,7 +56,7 @@ class ConcatOutputDescription(OutputDescription): def __init__(self) -> None: ... @typing.overload - def __init__(self, body_value_index: int, output_index: int, start: int, stride: int, part_size: int, end: int, axis: int) -> None: + def __init__(self, body_value_index: typing.SupportsInt, output_index: typing.SupportsInt, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> None: ... def __repr__(self) -> str: ... @@ -87,7 +87,6 @@ class ConcatOutputDescription(OutputDescription): ... class IndexReduction: index_element_type: openvino._pyopenvino.Type - reduction_axis: int def __repr__(self) -> str: ... def get_index_element_type(self) -> openvino._pyopenvino.Type: @@ -96,7 +95,13 @@ class IndexReduction: ... def set_index_element_type(self, arg0: openvino._pyopenvino.Type) -> None: ... - def set_reduction_axis(self, arg0: int) -> None: + def set_reduction_axis(self, arg0: typing.SupportsInt) -> None: + ... + @property + def reduction_axis(self) -> int: + ... + @reduction_axis.setter + def reduction_axis(self, arg1: typing.SupportsInt) -> None: ... class InputDescription: def __init__(self) -> None: @@ -113,7 +118,7 @@ class InvariantInputDescription(InputDescription): def __init__(self) -> None: ... @typing.overload - def __init__(self, input_index: int, body_parameter_index: int) -> None: + def __init__(self, input_index: typing.SupportsInt, body_parameter_index: typing.SupportsInt) -> None: ... def __repr__(self) -> str: ... @@ -135,7 +140,7 @@ class MergedInputDescription(InputDescription): def __init__(self) -> None: ... @typing.overload - def __init__(self, input_index: int, body_parameter_index: int, body_value_index: int) -> None: + def __init__(self, input_index: typing.SupportsInt, body_parameter_index: typing.SupportsInt, body_value_index: typing.SupportsInt) -> None: ... def __repr__(self) -> str: ... @@ -167,7 +172,7 @@ class SliceInputDescription(InputDescription): def __init__(self) -> None: ... @typing.overload - def __init__(self, input_index: int, body_parameter_index: int, start: int, stride: int, part_size: int, end: int, axis: int) -> None: + def __init__(self, input_index: typing.SupportsInt, body_parameter_index: typing.SupportsInt, start: typing.SupportsInt, stride: typing.SupportsInt, part_size: typing.SupportsInt, end: typing.SupportsInt, axis: typing.SupportsInt) -> None: ... def __repr__(self) -> str: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/passes.pyi b/src/bindings/python/src/openvino/_pyopenvino/passes.pyi index b1f396edd0b5d7..7a2bb63e0d254c 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/passes.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/passes.pyi @@ -1,5 +1,6 @@ # type: ignore from __future__ import annotations +import collections.abc import openvino._pyopenvino import openvino._pyopenvino.op import typing @@ -17,7 +18,7 @@ class AnyInput(openvino._pyopenvino.Node): Create pattern AnyInput operation which is used to match any type of node. """ @typing.overload - def __init__(self, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create pattern AnyInput operation which is used to match any type of node. @@ -120,7 +121,7 @@ class MakeStateful(ModelPass, PassBase): openvino.passes.MakeStateful transformation """ @typing.overload - def __init__(self, pairs_to_replace: list[tuple[openvino._pyopenvino.op.Parameter, openvino._pyopenvino.op.Result]]) -> None: + def __init__(self, pairs_to_replace: collections.abc.Sequence[tuple[openvino._pyopenvino.op.Parameter, openvino._pyopenvino.op.Result]]) -> None: """ The transformation replaces the provided pairs Parameter and Result with openvino Memory operations ReadValue and Assign. @@ -128,7 +129,7 @@ class MakeStateful(ModelPass, PassBase): :type pairs_to_replace: list[tuple[op.Parameter, op.Result] """ @typing.overload - def __init__(self, pairs_to_replace: dict[str, str]) -> None: + def __init__(self, pairs_to_replace: collections.abc.Mapping[str, str]) -> None: """ The transformation replaces the provided pairs Parameter and Result with openvino Memory operations ReadValue and Assign. @@ -269,7 +270,7 @@ class MatcherPass(PassBase): def __init__(self) -> None: ... @typing.overload - def __init__(self, matcher: Matcher, callback: typing.Callable[[Matcher], bool]) -> None: + def __init__(self, matcher: Matcher, callback: collections.abc.Callable[[Matcher], bool]) -> None: """ Create MatcherPass from existing Matcher and callback objects. @@ -291,7 +292,7 @@ class MatcherPass(PassBase): :return: callback return code. :rtype: bool """ - def register_matcher(self, matcher: Matcher, callback: typing.Callable[[Matcher], bool]) -> None: + def register_matcher(self, matcher: Matcher, callback: collections.abc.Callable[[Matcher], bool]) -> None: """ Initialize matcher and callback for further execution. @@ -334,7 +335,7 @@ class Optional(openvino._pyopenvino.Node): openvino.passes.Optional wraps ov::pass::pattern::op::Optional """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str]) -> None: """ Create Optional with the given node type. @@ -342,7 +343,7 @@ class Optional(openvino._pyopenvino.Node): :type type_names: list[str] """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Output) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output) -> None: """ Create Optional with the given node type and input node. @@ -353,7 +354,7 @@ class Optional(openvino._pyopenvino.Node): :type input: openvino.Output """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Node) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node) -> None: """ Create Optional with the given node type, input node and predicate. @@ -364,7 +365,7 @@ class Optional(openvino._pyopenvino.Node): :type input: openvino.Node """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Output]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: """ Create Optional with the given node type and input node. @@ -375,7 +376,7 @@ class Optional(openvino._pyopenvino.Node): :type inputs: list[openvino.Output] """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Node]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node]) -> None: """ Create Optional with the given node type and input node. @@ -386,7 +387,7 @@ class Optional(openvino._pyopenvino.Node): :type inputs: list[openvino.Node] """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Optional with the given node type and predicate. @@ -397,7 +398,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], predicate: Predicate) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], predicate: Predicate) -> None: """ Create Optional with the given node type and predicate. @@ -408,7 +409,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Output, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Optional with the given node type, input node and predicate. @@ -422,7 +423,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Output, predicate: Predicate) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output, predicate: Predicate) -> None: """ Create Optional with the given node type, input node and predicate. @@ -436,7 +437,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Node, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Optional with the given node type, input node and predicate. @@ -450,7 +451,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], input: openvino._pyopenvino.Node, predicate: Predicate) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node, predicate: Predicate) -> None: """ Create Optional with the given node type, input node and predicate. @@ -464,7 +465,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Output], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Optional with the given node type, input node and predicate. @@ -478,7 +479,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Output], predicate: Predicate) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: Predicate) -> None: """ Create Optional with the given node type, input node and predicate. @@ -492,7 +493,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Node], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Optional with the given node type, input node and predicate. @@ -506,7 +507,7 @@ class Optional(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self: typing.Optional, type_names: list[str], inputs: list[openvino._pyopenvino.Node], predicate: Predicate) -> None: + def __init__(self: typing.Optional, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: Predicate) -> None: """ Create Optional with the given node type, input node and predicate. @@ -526,7 +527,7 @@ class Or(openvino._pyopenvino.Node): openvino.passes.Or wraps ov::pass::pattern::op::Or """ @typing.overload - def __init__(self, inputs: list[openvino._pyopenvino.Output]) -> None: + def __init__(self, inputs: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: """ Create pattern Or operation which is used to match any of given inputs. @@ -534,7 +535,7 @@ class Or(openvino._pyopenvino.Node): :type inputs: list[openvino.Output] """ @typing.overload - def __init__(self, inputs: list[openvino._pyopenvino.Node]) -> None: + def __init__(self, inputs: collections.abc.Sequence[openvino._pyopenvino.Node]) -> None: """ Create pattern Or operation which is used to match any of given inputs. @@ -579,7 +580,7 @@ class PatternSymbolValue: :type value: openvino.Symbol """ @typing.overload - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: """ Create PatternSymbolValue with the given value. @@ -587,7 +588,7 @@ class PatternSymbolValue: :type value: int """ @typing.overload - def __init__(self, value: float) -> None: + def __init__(self, value: typing.SupportsFloat) -> None: """ Create PatternSymbolValue with the given value. @@ -595,7 +596,7 @@ class PatternSymbolValue: :type value: float """ @typing.overload - def __init__(self, value: list[PatternSymbolValue]) -> None: + def __init__(self, value: collections.abc.Sequence[PatternSymbolValue]) -> None: """ Create PatternSymbolValue with the given value. @@ -630,7 +631,7 @@ class Predicate: Create default Predicate which always returns true. """ @typing.overload - def __init__(self, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create Predicate from a given function. @@ -638,7 +639,7 @@ class Predicate: :type predicate: Callable """ @typing.overload - def __init__(self, predicate: typing.Callable[[dict[str, ...], openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, predicate: collections.abc.Callable[[collections.abc.Mapping[str, ...], openvino._pyopenvino.Output], bool]) -> None: """ Create Predicate from a given function. @@ -690,7 +691,7 @@ class Version: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -702,7 +703,7 @@ class Version: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -716,7 +717,7 @@ class VisualizeTree(ModelPass, PassBase): """ openvino.passes.VisualizeTree transformation """ - def __init__(self, file_name: str, nm: typing.Callable[[openvino._pyopenvino.Node, list[str]], None] = None, don_only: bool = False) -> None: + def __init__(self, file_name: str, nm: collections.abc.Callable[[openvino._pyopenvino.Node, collections.abc.Sequence[str]], None] = None, don_only: bool = False) -> None: """ Create VisualizeTree pass which is used for Model to dot serialization. @@ -744,7 +745,7 @@ class WrapType(openvino._pyopenvino.Node): :type type_name: str """ @typing.overload - def __init__(self, type_name: str, pred: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_name: str, pred: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node type and predicate. @@ -788,7 +789,7 @@ class WrapType(openvino._pyopenvino.Node): :type input: openvino.Node """ @typing.overload - def __init__(self, type_name: str, input: openvino._pyopenvino.Output, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_name: str, input: openvino._pyopenvino.Output, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node type, input node and predicate. @@ -816,7 +817,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_name: str, input: openvino._pyopenvino.Node, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_name: str, input: openvino._pyopenvino.Node, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node type, input node and predicate. @@ -844,7 +845,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Output]) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: """ Create WrapType with given node type and input nodes. @@ -855,7 +856,7 @@ class WrapType(openvino._pyopenvino.Node): :type inputs: list[openvino.Output] """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Node]) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Node]) -> None: """ Create WrapType with given node type and input nodes. @@ -866,7 +867,7 @@ class WrapType(openvino._pyopenvino.Node): :type inputs: list[openvino.Node] """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Output], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node type, input nodes and predicate. @@ -880,7 +881,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Output], predicate: Predicate) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: Predicate) -> None: """ Create WrapType with given node type, input nodes and predicate. @@ -894,7 +895,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Node], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node type, input nodes and predicate. @@ -908,7 +909,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_name: str, inputs: list[openvino._pyopenvino.Node], predicate: Predicate) -> None: + def __init__(self, type_name: str, inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: Predicate) -> None: """ Create WrapType with given node type, input nodes and predicate. @@ -922,7 +923,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str]) -> None: """ Create WrapType with given node types. @@ -930,7 +931,7 @@ class WrapType(openvino._pyopenvino.Node): :type type_names: list[str] """ @typing.overload - def __init__(self, type_names: list[str], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node types and predicate. @@ -941,7 +942,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], predicate: Predicate) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], predicate: Predicate) -> None: """ Create WrapType with given node types and predicate. @@ -952,7 +953,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Output) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output) -> None: """ Create WrapType with given node types and input. @@ -963,7 +964,7 @@ class WrapType(openvino._pyopenvino.Node): :type input: openvino.Output """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Node) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node) -> None: """ Create WrapType with given node types and input. @@ -974,7 +975,7 @@ class WrapType(openvino._pyopenvino.Node): :type input: openvino.Node """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Output, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node types, input and predicate. @@ -988,7 +989,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Output, predicate: Predicate) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Output, predicate: Predicate) -> None: """ Create WrapType with given node types, input and predicate. @@ -1002,7 +1003,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Node, predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node, predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node types, input and predicate. @@ -1016,7 +1017,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], input: openvino._pyopenvino.Node, predicate: Predicate) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], input: openvino._pyopenvino.Node, predicate: Predicate) -> None: """ Create WrapType with given node types, input and predicate. @@ -1030,7 +1031,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Output]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: """ Create WrapType with given node types and input. @@ -1041,7 +1042,7 @@ class WrapType(openvino._pyopenvino.Node): :type inputs: list[openvino.Output] """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Node]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node]) -> None: """ Create WrapType with given node types and inputs. @@ -1052,7 +1053,7 @@ class WrapType(openvino._pyopenvino.Node): :type inputs: list[openvino.Node] """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Output], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node types, inputs and predicate. @@ -1066,7 +1067,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Output], predicate: Predicate) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Output], predicate: Predicate) -> None: """ Create WrapType with given node types, inputs and predicate. @@ -1080,7 +1081,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Node], predicate: typing.Callable[[openvino._pyopenvino.Output], bool]) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: collections.abc.Callable[[openvino._pyopenvino.Output], bool]) -> None: """ Create WrapType with given node types, inputs and predicate. @@ -1094,7 +1095,7 @@ class WrapType(openvino._pyopenvino.Node): :type predicate: Callable """ @typing.overload - def __init__(self, type_names: list[str], inputs: list[openvino._pyopenvino.Node], predicate: Predicate) -> None: + def __init__(self, type_names: collections.abc.Sequence[str], inputs: collections.abc.Sequence[openvino._pyopenvino.Node], predicate: Predicate) -> None: """ Create WrapType with given node types, inputs and predicate. @@ -1111,11 +1112,11 @@ class WrapType(openvino._pyopenvino.Node): ... def attrs_match(arg0: typing.Any) -> Predicate: ... -def consumers_count(arg0: int) -> Predicate: +def consumers_count(arg0: typing.SupportsInt) -> Predicate: ... -def has_static_dim(arg0: int) -> Predicate: +def has_static_dim(arg0: typing.SupportsInt) -> Predicate: ... -def has_static_dims(arg0: list[int]) -> Predicate: +def has_static_dims(arg0: collections.abc.Sequence[typing.SupportsInt]) -> Predicate: ... def has_static_rank() -> Predicate: ... @@ -1129,5 +1130,5 @@ def shape_matches(arg0: str) -> Predicate: ... def type_matches(arg0: openvino._pyopenvino.Type) -> Predicate: ... -def type_matches_any(arg0: list[openvino._pyopenvino.Type]) -> Predicate: +def type_matches_any(arg0: collections.abc.Sequence[openvino._pyopenvino.Type]) -> Predicate: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/preprocess.pyi b/src/bindings/python/src/openvino/_pyopenvino/preprocess.pyi index 84c070772d7d46..2d68afe5d193c6 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/preprocess.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/preprocess.pyi @@ -1,5 +1,6 @@ # type: ignore from __future__ import annotations +import collections.abc import numpy import openvino._pyopenvino import typing @@ -50,7 +51,7 @@ class ColorFormat: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -58,7 +59,7 @@ class ColorFormat: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -92,7 +93,7 @@ class InputTensorInfo: """ openvino.preprocess.InputTensorInfo wraps ov::preprocess::InputTensorInfo """ - def set_color_format(self, format: ColorFormat, sub_names: list[str] = []) -> InputTensorInfo: + def set_color_format(self, format: ColorFormat, sub_names: collections.abc.Sequence[str] = []) -> InputTensorInfo: ... def set_element_type(self, type: openvino._pyopenvino.Type) -> InputTensorInfo: """ @@ -109,7 +110,7 @@ class InputTensorInfo: """ 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 tensor is already known and avaiable before. + used only in case if tensor is already known and available before. :param tensor: User's created tensor :type type: openvino.Tensor @@ -121,7 +122,7 @@ class InputTensorInfo: """ 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 tensor is already known and avaiable before. + used only in case if tensor is already known and available before. :param tensor: User's created numpy array :type type: numpy.ndarray @@ -141,11 +142,11 @@ class InputTensorInfo: def set_shape(self, shape: openvino._pyopenvino.PartialShape) -> InputTensorInfo: ... @typing.overload - def set_shape(self, shape: list[int]) -> InputTensorInfo: + def set_shape(self, shape: collections.abc.Sequence[typing.SupportsInt]) -> InputTensorInfo: ... def set_spatial_dynamic_shape(self) -> InputTensorInfo: ... - def set_spatial_static_shape(self, height: int, width: int) -> InputTensorInfo: + def set_spatial_static_shape(self, height: typing.SupportsInt, width: typing.SupportsInt) -> InputTensorInfo: ... class OutputInfo: """ @@ -211,7 +212,7 @@ class PaddingMode: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -219,7 +220,7 @@ class PaddingMode: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -247,9 +248,9 @@ class PostProcessSteps: def convert_layout(self, dst_layout: openvino._pyopenvino.Layout) -> PostProcessSteps: ... @typing.overload - def convert_layout(self, dims: list[int]) -> PostProcessSteps: + def convert_layout(self, dims: collections.abc.Sequence[typing.SupportsInt]) -> PostProcessSteps: ... - def custom(self, operation: typing.Callable) -> PostProcessSteps: + def custom(self, operation: collections.abc.Callable) -> PostProcessSteps: """ Adds custom postprocessing operation. @@ -279,7 +280,7 @@ class PrePostProcessor: def input(self, tensor_name: str) -> InputInfo: ... @typing.overload - def input(self, input_index: int) -> InputInfo: + def input(self, input_index: typing.SupportsInt) -> InputInfo: ... @typing.overload def output(self) -> OutputInfo: @@ -288,7 +289,7 @@ class PrePostProcessor: def output(self, tensor_name: str) -> OutputInfo: ... @typing.overload - def output(self, output_index: int) -> OutputInfo: + def output(self, output_index: typing.SupportsInt) -> OutputInfo: ... class PreProcessSteps: """ @@ -310,11 +311,11 @@ class PreProcessSteps: def convert_layout(self, dst_layout: openvino._pyopenvino.Layout) -> PreProcessSteps: ... @typing.overload - def convert_layout(self, dims: list[int]) -> PreProcessSteps: + def convert_layout(self, dims: collections.abc.Sequence[typing.SupportsInt]) -> PreProcessSteps: ... - def crop(self, begin: list[int], end: list[int]) -> PreProcessSteps: + def crop(self, begin: collections.abc.Sequence[typing.SupportsInt], end: collections.abc.Sequence[typing.SupportsInt]) -> PreProcessSteps: ... - def custom(self, operation: typing.Callable) -> PreProcessSteps: + def custom(self, operation: collections.abc.Callable) -> PreProcessSteps: """ Adds custom preprocessing operation. @@ -324,7 +325,7 @@ class PreProcessSteps: :rtype: openvino.preprocess.PreProcessSteps """ @typing.overload - def mean(self, value: float) -> PreProcessSteps: + def mean(self, value: typing.SupportsFloat) -> PreProcessSteps: """ Subtracts single float value from each element in input tensor. Input tensor must have ov.Type.f32 data type. @@ -335,7 +336,7 @@ class PreProcessSteps: :rtype: openvino.preprocess.PreProcessSteps """ @typing.overload - def mean(self, values: list[float]) -> PreProcessSteps: + def mean(self, values: collections.abc.Sequence[typing.SupportsFloat]) -> PreProcessSteps: """ Subtracts a given single float value from each element in a given channel from input tensor. Input tensor must have ov.Type.f32 data type. @@ -346,7 +347,7 @@ class PreProcessSteps: :rtype: openvino.preprocess.PreProcessSteps """ @typing.overload - def pad(self, pads_begin: list[int], pads_end: list[int], value: float, mode: PaddingMode) -> PreProcessSteps: + def pad(self, pads_begin: collections.abc.Sequence[typing.SupportsInt], pads_end: collections.abc.Sequence[typing.SupportsInt], value: typing.SupportsFloat, mode: PaddingMode) -> PreProcessSteps: """ Adds padding preprocessing operation. @@ -354,7 +355,7 @@ class PreProcessSteps: :type pads_begin: 1D tensor of type T_INT. :param pads_end: Number of elements matches the number of indices in data attribute. Specifies the number of padding elements at the ending of each axis. :type pads_end: 1D tensor of type T_INT. - :param value: All new elements are populated with this value or with 0 if input not provided. Shouldn’t be set for other pad_mode values. + :param value: All new elements are populated with this value or with 0 if input not provided. Shouldn't be set for other pad_mode values. :type value: scalar tensor of type T. :param mode: pad_mode specifies the method used to generate new element values. :type mode: string @@ -362,7 +363,7 @@ class PreProcessSteps: :rtype: openvino.preprocess.PreProcessSteps """ @typing.overload - def pad(self, pads_begin: list[int], pads_end: list[int], value: list[float], mode: PaddingMode) -> PreProcessSteps: + def pad(self, pads_begin: collections.abc.Sequence[typing.SupportsInt], pads_end: collections.abc.Sequence[typing.SupportsInt], value: collections.abc.Sequence[typing.SupportsFloat], mode: PaddingMode) -> PreProcessSteps: """ Adds padding preprocessing operation. @@ -370,7 +371,7 @@ class PreProcessSteps: :type pads_begin: 1D tensor of type T_INT. :param pads_end: Number of elements matches the number of indices in data attribute. Specifies the number of padding elements at the ending of each axis. :type pads_end: 1D tensor of type T_INT. - :param value: All new elements are populated with this value or with 0 if input not provided. Shouldn’t be set for other pad_mode values. + :param value: All new elements are populated with this value or with 0 if input not provided. Shouldn't be set for other pad_mode values. :type value: scalar tensor of type T. :param mode: pad_mode specifies the method used to generate new element values. :type mode: string @@ -378,7 +379,7 @@ class PreProcessSteps: :rtype: openvino.PreProcessSteps """ @typing.overload - def resize(self, alg: ResizeAlgorithm, dst_height: int, dst_width: int) -> PreProcessSteps: + def resize(self, alg: ResizeAlgorithm, dst_height: typing.SupportsInt, dst_width: typing.SupportsInt) -> PreProcessSteps: ... @typing.overload def resize(self, alg: ResizeAlgorithm) -> PreProcessSteps: @@ -386,7 +387,7 @@ class PreProcessSteps: def reverse_channels(self) -> PreProcessSteps: ... @typing.overload - def scale(self, value: float) -> PreProcessSteps: + def scale(self, value: typing.SupportsFloat) -> PreProcessSteps: """ Divides each element in input tensor by specified constant float value. Input tensor must have ov.Type.f32 data type. @@ -397,7 +398,7 @@ class PreProcessSteps: :rtype: openvino.preprocess.PreProcessSteps """ @typing.overload - def scale(self, values: list[float]) -> PreProcessSteps: + def scale(self, values: collections.abc.Sequence[typing.SupportsFloat]) -> PreProcessSteps: """ Divides each element in a given channel from input tensor by a given single float value. Input tensor must have ov.Type.f32 data type. @@ -435,7 +436,7 @@ class ResizeAlgorithm: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -443,7 +444,7 @@ class ResizeAlgorithm: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/__init__.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/__init__.pyi index a46bde6df00dc1..27d7cec171f628 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/__init__.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/__init__.pyi @@ -37,7 +37,7 @@ class CacheMode: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -49,7 +49,7 @@ class CacheMode: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -82,7 +82,7 @@ class WorkloadType: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -94,7 +94,7 @@ class WorkloadType: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -108,7 +108,7 @@ class WorkloadType: def auto_batch_timeout() -> str: ... @typing.overload -def auto_batch_timeout(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def auto_batch_timeout(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... def available_devices() -> str: ... @@ -130,7 +130,7 @@ def cache_mode(arg0: CacheMode) -> tuple[str, openvino._pyopenvino.OVAny]: def compilation_num_threads() -> str: ... @typing.overload -def compilation_num_threads(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def compilation_num_threads(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def enable_mmap() -> str: @@ -156,13 +156,13 @@ def force_tbb_terminate(arg0: bool) -> tuple[str, openvino._pyopenvino.OVAny]: def inference_num_threads() -> str: ... @typing.overload -def inference_num_threads(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def inference_num_threads(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def key_cache_group_size() -> str: ... @typing.overload -def key_cache_group_size(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def key_cache_group_size(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def key_cache_precision() -> str: @@ -196,7 +196,7 @@ def supported_properties() -> str: def value_cache_group_size() -> str: ... @typing.overload -def value_cache_group_size(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def value_cache_group_size(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def value_cache_precision() -> str: diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/device.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/device.pyi index 24ce1343fb2a03..a09c784954333a 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/device.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/device.pyi @@ -19,7 +19,7 @@ class Capability: INT8: typing.ClassVar[str] = 'INT8' WINOGRAD: typing.ClassVar[str] = 'WINOGRAD' class PCIInfo: - def __init__(self, arg0: int, arg1: int, arg2: int, arg3: int) -> None: + def __init__(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt, arg2: typing.SupportsInt, arg3: typing.SupportsInt) -> None: ... def __repr__(self) -> typing.Any: ... @@ -60,7 +60,7 @@ class Type: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -72,7 +72,7 @@ class Type: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/hint.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/hint.pyi index 7408e23e2e7caf..689b26a9509329 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/hint.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/hint.pyi @@ -1,5 +1,6 @@ # type: ignore from __future__ import annotations +import collections.abc import openvino._pyopenvino import typing """ @@ -29,7 +30,7 @@ class ExecutionMode: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -41,7 +42,7 @@ class ExecutionMode: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -74,7 +75,7 @@ class ModelDistributionPolicy: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -86,7 +87,7 @@ class ModelDistributionPolicy: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -122,7 +123,7 @@ class PerformanceMode: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -134,7 +135,7 @@ class PerformanceMode: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -173,7 +174,7 @@ class Priority: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -185,7 +186,7 @@ class Priority: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -221,7 +222,7 @@ class SchedulingCoreType: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -233,7 +234,7 @@ class SchedulingCoreType: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... @@ -247,7 +248,7 @@ class SchedulingCoreType: def activations_scale_factor() -> str: ... @typing.overload -def activations_scale_factor(arg0: float) -> tuple[str, openvino._pyopenvino.OVAny]: +def activations_scale_factor(arg0: typing.SupportsFloat) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def allow_auto_batching() -> str: @@ -265,7 +266,7 @@ def compiled_blob(arg0: openvino._pyopenvino.Tensor) -> tuple[str, openvino._pyo def dynamic_quantization_group_size() -> str: ... @typing.overload -def dynamic_quantization_group_size(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def dynamic_quantization_group_size(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def enable_cpu_pinning() -> str: @@ -307,7 +308,7 @@ def model(arg0: openvino._pyopenvino.Model) -> tuple[str, openvino._pyopenvino.O def model_distribution_policy() -> str: ... @typing.overload -def model_distribution_policy(arg0: set[ModelDistributionPolicy]) -> tuple[str, openvino._pyopenvino.OVAny]: +def model_distribution_policy(arg0: collections.abc.Set[ModelDistributionPolicy]) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def model_priority() -> str: @@ -319,7 +320,7 @@ def model_priority(arg0: Priority) -> tuple[str, openvino._pyopenvino.OVAny]: def num_requests() -> str: ... @typing.overload -def num_requests(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def num_requests(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def performance_mode() -> str: diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_auto.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_auto.pyi index f4019fbce5380e..95b02934612878 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_auto.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_auto.pyi @@ -32,7 +32,7 @@ class SchedulePolicy: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -44,7 +44,7 @@ class SchedulePolicy: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_cpu.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_cpu.pyi index f24ce227c6b829..a21e44c0a4f630 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_cpu.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_cpu.pyi @@ -16,5 +16,5 @@ def denormals_optimization(arg0: bool) -> tuple[str, openvino._pyopenvino.OVAny] def sparse_weights_decompression_rate() -> str: ... @typing.overload -def sparse_weights_decompression_rate(arg0: float) -> tuple[str, openvino._pyopenvino.OVAny]: +def sparse_weights_decompression_rate(arg0: typing.SupportsFloat) -> tuple[str, openvino._pyopenvino.OVAny]: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_gpu/hint.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_gpu/hint.pyi index 9fff4cd95c9193..b2becfb41a4f15 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_gpu/hint.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_gpu/hint.pyi @@ -19,7 +19,7 @@ class ThrottleLevel: def available_device_mem() -> str: ... @typing.overload -def available_device_mem(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def available_device_mem(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def enable_lora_operation() -> str: diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_npu.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_npu.pyi index c809d3eea39f23..d826fe697003b3 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/intel_npu.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/intel_npu.pyi @@ -42,7 +42,7 @@ def driver_version() -> str: def max_tiles() -> str: ... @typing.overload -def max_tiles(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def max_tiles(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def qdq_optimization() -> str: @@ -60,7 +60,7 @@ def run_inferences_sequentially(arg0: bool) -> tuple[str, openvino._pyopenvino.O def tiles() -> str: ... @typing.overload -def tiles(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def tiles(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload def turbo() -> str: diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/log.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/log.pyi index dd88fbeb0470d4..45d4244e5e633b 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/log.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/log.pyi @@ -41,7 +41,7 @@ class Level: ... def __index__(self) -> int: ... - def __init__(self, value: int) -> None: + def __init__(self, value: typing.SupportsInt) -> None: ... def __int__(self) -> int: ... @@ -53,7 +53,7 @@ class Level: ... def __repr__(self) -> str: ... - def __setstate__(self, state: int) -> None: + def __setstate__(self, state: typing.SupportsInt) -> None: ... def __str__(self) -> str: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/properties/streams.pyi b/src/bindings/python/src/openvino/_pyopenvino/properties/streams.pyi index d46dda51c13009..5e0defdac62d15 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/properties/streams.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/properties/streams.pyi @@ -13,7 +13,7 @@ class Num: def __init__(self) -> None: ... @typing.overload - def __init__(self, arg0: int) -> None: + def __init__(self, arg0: typing.SupportsInt) -> None: ... def to_integer(self) -> int: ... @@ -24,5 +24,5 @@ def num() -> str: def num(arg0: Num) -> tuple[str, openvino._pyopenvino.OVAny]: ... @typing.overload -def num(arg0: int) -> tuple[str, openvino._pyopenvino.OVAny]: +def num(arg0: typing.SupportsInt) -> tuple[str, openvino._pyopenvino.OVAny]: ... diff --git a/src/bindings/python/src/openvino/_pyopenvino/util.pyi b/src/bindings/python/src/openvino/_pyopenvino/util.pyi index 815d138ae18626..203fdb28626116 100644 --- a/src/bindings/python/src/openvino/_pyopenvino/util.pyi +++ b/src/bindings/python/src/openvino/_pyopenvino/util.pyi @@ -1,5 +1,6 @@ # type: ignore from __future__ import annotations +import collections.abc import numpy import openvino._pyopenvino import typing @@ -7,7 +8,7 @@ import typing openvino.utils """ __all__ = ['deprecation_warning', 'numpy_to_c', 'replace_node', 'replace_output_update_name'] -def deprecation_warning(function_name: str, version: str = '', message: str = '', stacklevel: int = 2) -> None: +def deprecation_warning(function_name: str, version: str = '', message: str = '', stacklevel: typing.SupportsInt = 2) -> None: """ Prints deprecation warning "{function_name} is deprecated and will be removed in version {version}. {message}". @@ -16,16 +17,16 @@ def deprecation_warning(function_name: str, version: str = '', message: str = '' :param message: A message explaining why the function is deprecated. :param stacklevel: How many layers should be propagated. """ -def numpy_to_c(arg0: numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> capsule: +def numpy_to_c(arg0: numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]) -> typing_extensions.CapsuleType: ... @typing.overload def replace_node(target: openvino._pyopenvino.Node, replacement: openvino._pyopenvino.Node) -> None: ... @typing.overload -def replace_node(target: openvino._pyopenvino.Node, replacement: list[openvino._pyopenvino.Output]) -> None: +def replace_node(target: openvino._pyopenvino.Node, replacement: collections.abc.Sequence[openvino._pyopenvino.Output]) -> None: ... @typing.overload -def replace_node(target: openvino._pyopenvino.Node, replacement: openvino._pyopenvino.Node, outputs_order: list[int]) -> None: +def replace_node(target: openvino._pyopenvino.Node, replacement: openvino._pyopenvino.Node, outputs_order: collections.abc.Sequence[typing.SupportsInt]) -> None: ... def replace_output_update_name(output: openvino._pyopenvino.Output, target_output: openvino._pyopenvino.Output) -> bool: ... diff --git a/src/bindings/python/src/openvino/experimental/__init__.pyi b/src/bindings/python/src/openvino/experimental/__init__.pyi index 5a29738a7a0c85..2ba8f7b6048e82 100644 --- a/src/bindings/python/src/openvino/experimental/__init__.pyi +++ b/src/bindings/python/src/openvino/experimental/__init__.pyi @@ -1,9 +1,9 @@ # type: ignore from __future__ import annotations -from openvino._pyopenvino.experimental import evaluate_as_partial_shape -from openvino._pyopenvino.experimental import evaluate_both_bounds -from openvino._pyopenvino.experimental import set_element_type -from openvino._pyopenvino.experimental import set_tensor_type +from openvino._pyopenvino.experimental.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import evaluate_as_partial_shape +from openvino._pyopenvino.experimental.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import evaluate_both_bounds +from openvino._pyopenvino.experimental.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import set_element_type +from openvino._pyopenvino.experimental.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import set_tensor_type """ Package: openvino diff --git a/src/bindings/python/src/openvino/frontend/__init__.pyi b/src/bindings/python/src/openvino/frontend/__init__.pyi index 089912a80ce652..ff296f8c70c9e0 100644 --- a/src/bindings/python/src/openvino/frontend/__init__.pyi +++ b/src/bindings/python/src/openvino/frontend/__init__.pyi @@ -14,8 +14,8 @@ from openvino._pyopenvino import OpValidationFailure from openvino._pyopenvino import Place from openvino._pyopenvino import ProgressReporterExtension from openvino._pyopenvino import TelemetryExtension -from openvino._pyopenvino import get_version from openvino._pyopenvino.frontend import OpExtension +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version from openvino.frontend.frontend import FrontEnd from openvino.frontend.frontend import FrontEndManager """ diff --git a/src/bindings/python/src/openvino/frontend/tensorflow/py_tensorflow_frontend.pyi b/src/bindings/python/src/openvino/frontend/tensorflow/py_tensorflow_frontend.pyi index 140451f82a7c27..817c23382cffc4 100644 --- a/src/bindings/python/src/openvino/frontend/tensorflow/py_tensorflow_frontend.pyi +++ b/src/bindings/python/src/openvino/frontend/tensorflow/py_tensorflow_frontend.pyi @@ -1,17 +1,18 @@ # type: ignore from __future__ import annotations +import collections.abc import openvino._pyopenvino import typing __all__ = ['ConversionExtensionTensorflow', 'OpExtensionTensorflow'] class ConversionExtensionTensorflow(_ConversionExtensionTensorflow): - def __init__(self, arg0: str, arg1: typing.Callable[[openvino._pyopenvino.NodeContext], list[openvino._pyopenvino.Output]]) -> None: + def __init__(self, arg0: str, arg1: collections.abc.Callable[[openvino._pyopenvino.NodeContext], list[openvino._pyopenvino.Output]]) -> None: ... class OpExtensionTensorflow(_ConversionExtensionTensorflow): @typing.overload - def __init__(self, fw_type_name: str, attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, fw_type_name: str, attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... @typing.overload - def __init__(self, ov_type_name: str, fw_type_name: str, attr_names_map: dict[str, str] = {}, attr_values_map: dict[str, typing.Any] = {}) -> None: + def __init__(self, ov_type_name: str, fw_type_name: str, attr_names_map: collections.abc.Mapping[str, str] = {}, attr_values_map: collections.abc.Mapping[str, typing.Any] = {}) -> None: ... class _ConversionExtensionTensorflow(openvino._pyopenvino.ConversionExtensionBase): pass diff --git a/src/bindings/python/src/openvino/opset9/ops.pyi b/src/bindings/python/src/openvino/opset9/ops.pyi index a283a14356deb8..a49cc85db7a2e4 100644 --- a/src/bindings/python/src/openvino/opset9/ops.pyi +++ b/src/bindings/python/src/openvino/opset9/ops.pyi @@ -157,11 +157,11 @@ def roi_align(data: typing.Union[openvino._pyopenvino.Node, int, float, numpy.nd :param sampling_ratio: Number of bins over height and width to use to calculate each output feature map element. :param spatial_scale: Multiplicative spatial scale factor to translate ROI coordinates. - :param mode: Method to perform pooling to produce output feature map elements. Avaiable modes are: + :param mode: Method to perform pooling to produce output feature map elements. Available modes are: - 'max' - maximum pooling - 'avg' - average pooling :param aligned_mode: Specifies how to transform the coordinate in original tensor to the resized tensor. - Mode 'asymmetric' is the default value. Optional. Avaiable aligned modes are: + Mode 'asymmetric' is the default value. Optional. Available aligned modes are: - 'asymmetric' - 'half_pixel_for_nn' - 'half_pixel' diff --git a/src/bindings/python/src/openvino/preprocess/__init__.pyi b/src/bindings/python/src/openvino/preprocess/__init__.pyi index 48b40c2f71a7f0..5302aff095fb87 100644 --- a/src/bindings/python/src/openvino/preprocess/__init__.pyi +++ b/src/bindings/python/src/openvino/preprocess/__init__.pyi @@ -1,6 +1,5 @@ # type: ignore from __future__ import annotations -from openvino._pyopenvino import get_version from openvino._pyopenvino.preprocess import ColorFormat from openvino._pyopenvino.preprocess import InputInfo from openvino._pyopenvino.preprocess import InputModelInfo @@ -13,6 +12,7 @@ from openvino._pyopenvino.preprocess import PostProcessSteps from openvino._pyopenvino.preprocess import PrePostProcessor from openvino._pyopenvino.preprocess import PreProcessSteps from openvino._pyopenvino.preprocess import ResizeAlgorithm +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version """ Package: openvino diff --git a/src/bindings/python/src/openvino/tools/ovc/__init__.pyi b/src/bindings/python/src/openvino/tools/ovc/__init__.pyi index 62c47af78fc711..507426db3cb09d 100644 --- a/src/bindings/python/src/openvino/tools/ovc/__init__.pyi +++ b/src/bindings/python/src/openvino/tools/ovc/__init__.pyi @@ -13,7 +13,7 @@ from . import utils from . import version from __future__ import annotations from importlib import metadata as importlib_metadata -from openvino._pyopenvino import get_version as get_rt_version +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version as get_rt_version from openvino.tools.ovc.convert import convert_model from openvino.tools.ovc.telemetry_utils import init_ovc_telemetry from openvino.tools.ovc.telemetry_utils import is_keras3 diff --git a/src/bindings/python/src/openvino/tools/ovc/convert_impl.pyi b/src/bindings/python/src/openvino/tools/ovc/convert_impl.pyi index 59bdc238d27a7e..e16cb06f8e1a82 100644 --- a/src/bindings/python/src/openvino/tools/ovc/convert_impl.pyi +++ b/src/bindings/python/src/openvino/tools/ovc/convert_impl.pyi @@ -6,7 +6,7 @@ from collections.abc import Iterable from openvino._pyopenvino import OpConversionFailure from openvino._pyopenvino import PartialShape from openvino._pyopenvino import TelemetryExtension -from openvino._pyopenvino import get_version as get_rt_version +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version as get_rt_version from openvino.frontend.frontend import FrontEndManager from openvino.frontend.tensorflow.utils import create_tf_graph_iterator from openvino.frontend.tensorflow.utils import extract_model_graph diff --git a/src/bindings/python/src/openvino/tools/ovc/telemetry_utils.pyi b/src/bindings/python/src/openvino/tools/ovc/telemetry_utils.pyi index f21ec413514a2b..d1407019981b10 100644 --- a/src/bindings/python/src/openvino/tools/ovc/telemetry_utils.pyi +++ b/src/bindings/python/src/openvino/tools/ovc/telemetry_utils.pyi @@ -1,6 +1,6 @@ # type: ignore from __future__ import annotations -from openvino._pyopenvino import get_version as get_rt_version +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version as get_rt_version from openvino.tools.ovc.cli_parser import get_params_with_paths_list from openvino.tools.ovc.utils import check_values_equal from openvino_telemetry.backend import backend_ga4 diff --git a/src/bindings/python/src/openvino/tools/ovc/version.pyi b/src/bindings/python/src/openvino/tools/ovc/version.pyi index 000c6a290becec..bc6cef1cdee123 100644 --- a/src/bindings/python/src/openvino/tools/ovc/version.pyi +++ b/src/bindings/python/src/openvino/tools/ovc/version.pyi @@ -1,6 +1,6 @@ # type: ignore from __future__ import annotations -from openvino._pyopenvino import get_version as get_ie_version +from openvino._pyopenvino.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import get_version as get_ie_version import re as re __all__ = ['SingletonMetaClass', 'VersionChecker', 'extract_hash_from_version', 'extract_release_version', 'get_ie_version', 'get_simplified_ie_version', 're', 'simplify_version'] class SingletonMetaClass(type): diff --git a/src/bindings/python/src/openvino/utils/__init__.pyi b/src/bindings/python/src/openvino/utils/__init__.pyi index b2d192e0f73ba0..6e76eb50c7a701 100644 --- a/src/bindings/python/src/openvino/utils/__init__.pyi +++ b/src/bindings/python/src/openvino/utils/__init__.pyi @@ -6,9 +6,9 @@ from . import node_factory from . import postponed_constant from . import types from __future__ import annotations -from openvino._pyopenvino.util import numpy_to_c -from openvino._pyopenvino.util import replace_node -from openvino._pyopenvino.util import replace_output_update_name +from openvino._pyopenvino.util.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import numpy_to_c +from openvino._pyopenvino.util.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import replace_node +from openvino._pyopenvino.util.pybind11_detail_function_record_v1_system_libstdcpp_gxx_abi_1xxx_use_cxx11_abi_0 import replace_output_update_name from openvino.package_utils import classproperty from openvino.package_utils import deprecated from openvino.package_utils import deprecatedclassproperty