OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[PyOV] Update Python API stub files (#33245)
sys-openvino-ci297600a2db5c
diff --git a/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi b/src/bindings/python/src/openvino/_pyopenvino/__init__.pyiindex d4c9f862ce3..8c74507e996 100644--- a/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi+++ b/src/bindings/python/src/openvino/_pyopenvino/__init__.pyi@@ -548,7 +548,7 @@ class Core:"""openvino.Core class represents OpenVINO runtime Core entity. User applications can create several Core class instances, but in this case, the underlying plugins are created multiple times and not shared between several Core instances. The recommended way is to have a single Core instance per application."""- def __init__(self, xml_config_file: str = '') -> None:+ def __init__(self, xml_config_file: typing.Any = '') -> None:...def __repr__(self) -> str:...@@ -905,41 +905,27 @@ class Core::return: A model.:rtype: openvino.Model"""- @typing.overload- def register_plugin(self, plugin_name: str, device_name: str) -> None:- """- Register a new device and plugin which enable this device inside OpenVINO Runtime.-- :param plugin_name: A path (absolute or relative) or name of a plugin. Depending on platform,- `plugin_name` is wrapped with shared library suffix and prefix to identify- library full name E.g. on Linux platform plugin name specified as `plugin_name`- will be wrapped as `libplugin_name.so`.- :type plugin_name: str- :param device_name: A device name to register plugin for.- :type device_name: str- """- @typing.overload- def register_plugin(self, plugin_name: str, device_name: str, config: collections.abc.Mapping[str, typing.Any]) -> None:+ def register_plugin(self, plugin: typing.Any, device_name: str, config: collections.abc.Mapping[str, typing.Any] = {}) -> None:"""Register a new device and plugin which enable this device inside OpenVINO Runtime.- :param plugin_name: A path (absolute or relative) or name of a plugin. Depending on platform,+ :param plugin: A path (absolute or relative) or name of a plugin. Depending on platform,`plugin_name` is wrapped with shared library suffix and prefix to identifylibrary full name E.g. on Linux platform plugin name specified as `plugin_name`will be wrapped as `libplugin_name.so`.- :type plugin_name: str+ :type plugin: Union[str, bytes, pathlib.Path]:param device_name: A device name to register plugin for.:type device_name: str:param config: Plugin default configuration:type config: dict[str, typing.Any], optional"""- def register_plugins(self, xml_config_file: str) -> None:+ def register_plugins(self, xml_config_file: typing.Any) -> None:"""Registers a device plugin to OpenVINO Runtime Core instance using XML configurationfile with plugins description.:param xml_config_file: A path to .xml file with plugins to register.- :type xml_config_file: str+ :type xml_config_file: Union[str, bytes, pathlib.Path]"""@typing.overloaddef set_property(self, properties: collections.abc.Mapping[str, typing.Any]) -> None:diff --git a/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi b/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyiindex 884399e172b..8c125292c96 100644--- a/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi+++ b/src/bindings/python/src/openvino/_pyopenvino/_offline_transformations.pyi@@ -29,7 +29,7 @@ def compress_quantize_weights_transformation(model: typing.Any) -> None:...def convert_sequence_to_tensor_iterator_transformation(model: typing.Any) -> None:...-def paged_attention_transformation(model: typing.Any, use_block_indices_inputs: bool = False, use_score_outputs: bool = False, allow_score_aggregation: bool = False, allow_cache_rotation: bool = False, allow_xattention: bool = False) -> None:+def paged_attention_transformation(model: typing.Any, use_block_indices_inputs: bool = False, use_score_outputs: bool = False, allow_score_aggregation: bool = False, allow_cache_rotation: bool = False, allow_xattention: bool = False, allow_adaptive_rkv: bool = False) -> None:...def stateful_to_stateless_transformation(model: typing.Any) -> None:...diff --git a/src/bindings/python/src/openvino/utils/postponed_constant.pyi b/src/bindings/python/src/openvino/utils/postponed_constant.pyiindex 55423d2694c..ab16868f7b3 100644--- a/src/bindings/python/src/openvino/utils/postponed_constant.pyi+++ b/src/bindings/python/src/openvino/utils/postponed_constant.pyi@@ -7,12 +7,10 @@ from openvino._pyopenvino import Shapefrom openvino._pyopenvino import Tensorfrom openvino._pyopenvino import TensorVectorfrom openvino._pyopenvino import Type-from typing import cast-from typing import overloadimport collections.abcimport openvino._op_baseimport openvino._pyopenvino-__all__: list[str] = ['Callable', 'Op', 'PartialShape', 'PostponedConstant', 'Shape', 'Tensor', 'TensorVector', 'Type', 'cast', 'make_postponed_constant', 'overload']+__all__: list[str] = ['Callable', 'Op', 'PartialShape', 'PostponedConstant', 'Shape', 'Tensor', 'TensorVector', 'Type', 'make_postponed_constant']class PostponedConstant(openvino._op_base.Op):"""Postponed Constant is a way to materialize a big constant.@@ -21,7 +19,7 @@ class PostponedConstant(openvino._op_base.Op):to IR and then immediately disposes of it."""- def __init__(self, element_type: openvino._pyopenvino.Type, shape: openvino._pyopenvino.Shape, maker: collections.abc.Callable, name: typing.Optional[str] = None) -> None:+ def __init__(self, element_type: openvino._pyopenvino.Type, shape: openvino._pyopenvino.Shape, maker: collections.abc.Callable[[], openvino._pyopenvino.Tensor], name: typing.Optional[str] = None) -> None:"""Creates a PostponedConstant.@@ -29,11 +27,8 @@ class PostponedConstant(openvino._op_base.Op)::type element_type: openvino.Type:param shape: Shape of the constant.:type shape: openvino.Shape- :param maker: A callable that returns a Tensor or modifies the provided Tensor to- represent the constant.- Note: It's recommended to use a callable without arguments (returns Tensor)- to avoid unnecessary tensor data copies.- :type maker: Union[Callable[[], Tensor], Callable[[Tensor], None]]+ :param maker: A callable that returns a Tensor.+ :type maker: Callable[[], Tensor]:param name: Optional name for the constant.:type name: Optional[str]@@ -55,5 +50,5 @@ class PostponedConstant(openvino._op_base.Op):...def validate_and_infer_types(self) -> None:...-def make_postponed_constant(element_type: openvino._pyopenvino.Type, shape: openvino._pyopenvino.Shape, maker: collections.abc.Callable, name: typing.Optional[str] = None) -> openvino._op_base.Op:+def make_postponed_constant(element_type: openvino._pyopenvino.Type, shape: openvino._pyopenvino.Shape, maker: collections.abc.Callable[[], openvino._pyopenvino.Tensor], name: typing.Optional[str] = None) -> openvino._op_base.Op:...