Skip to content

Commit eda1536

Browse files
[PyOV] Update Python API stub files (openvinotoolkit#33031)
- Updated Python API stub (.pyi) files from the latest available nightly Auto-generated by GitHub Actions --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 24654ef commit eda1536

File tree

10 files changed

+81
-112
lines changed

10 files changed

+81
-112
lines changed

src/bindings/python/src/openvino/_ov_api.pyi

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,19 @@ class AsyncInferQueue(openvino._pyopenvino.AsyncInferQueue):
9393
9494
If set to `True` the data dispatcher tries to provide "zero-copy"
9595
Tensors for every input in form of:
96-
* `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor`
96+
97+
* `numpy.ndarray` and all the types that are castable to it,
98+
e.g. `torch.Tensor`
99+
97100
Data that is going to be copied:
98-
* `numpy.ndarray` which are not C contiguous and/or not writable (WRITEABLE flag is set to False)
101+
102+
* `numpy.ndarray` which are not C contiguous and/or not writable
103+
(WRITEABLE flag is set to False)
99104
* inputs which data types are mismatched from Infer Request's inputs
100105
* inputs that should be in `BF16` data type
101106
* scalar inputs (i.e. `np.float_`/`str`/`bytes`/`int`/`float`)
102107
* lists of simple data types (i.e. `str`/`bytes`/`int`/`float`)
108+
103109
Keeps Tensor inputs "as-is".
104110
105111
Note: Use with extra care, shared data can be modified during runtime!
@@ -157,13 +163,19 @@ class CompiledModel(openvino._pyopenvino.CompiledModel):
157163
158164
If set to `True` the data dispatcher tries to provide "zero-copy"
159165
Tensors for every input in form of:
160-
* `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor`
166+
167+
* `numpy.ndarray` and all the types that are castable to it,
168+
e.g. `torch.Tensor`
169+
161170
Data that is going to be copied:
162-
* `numpy.ndarray` which are not C contiguous and/or not writable (WRITEABLE flag is set to False)
171+
172+
* `numpy.ndarray` which are not C contiguous and/or not writable
173+
(WRITEABLE flag is set to False)
163174
* inputs which data types are mismatched from Infer Request's inputs
164175
* inputs that should be in `BF16` data type
165176
* scalar inputs (i.e. `np.float_`/`str`/`bytes`/`int`/`float`)
166177
* lists of simple data types (i.e. `str`/`bytes`/`int`/`float`)
178+
167179
Keeps Tensor inputs "as-is".
168180
169181
Note: Use with extra care, shared data can be modified during runtime!
@@ -386,13 +398,19 @@ class InferRequest(openvino.utils.data_helpers.wrappers._InferRequestWrapper):
386398
387399
If set to `True` the data dispatcher tries to provide "zero-copy"
388400
Tensors for every input in form of:
389-
* `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor`
401+
402+
* `numpy.ndarray` and all the types that are castable to it,
403+
e.g. `torch.Tensor`
404+
390405
Data that is going to be copied:
391-
* `numpy.ndarray` which are not C contiguous and/or not writable (WRITEABLE flag is set to False)
406+
407+
* `numpy.ndarray` which are not C contiguous and/or not writable
408+
(WRITEABLE flag is set to False)
392409
* inputs which data types are mismatched from Infer Request's inputs
393410
* inputs that should be in `BF16` data type
394411
* scalar inputs (i.e. `np.float_`/`str`/`bytes`/`int`/`float`)
395412
* lists of simple data types (i.e. `str`/`bytes`/`int`/`float`)
413+
396414
Keeps Tensor inputs "as-is".
397415
398416
Note: Use with extra care, shared data can be modified during runtime!
@@ -461,13 +479,19 @@ class InferRequest(openvino.utils.data_helpers.wrappers._InferRequestWrapper):
461479
462480
If set to `True` the data dispatcher tries to provide "zero-copy"
463481
Tensors for every input in form of:
464-
* `numpy.ndarray` and all the types that are castable to it, e.g. `torch.Tensor`
482+
483+
* `numpy.ndarray` and all the types that are castable to it,
484+
e.g. `torch.Tensor`
485+
465486
Data that is going to be copied:
466-
* `numpy.ndarray` which are not C contiguous and/or not writable (WRITEABLE flag is set to False)
487+
488+
* `numpy.ndarray` which are not C contiguous and/or not writable
489+
(WRITEABLE flag is set to False)
467490
* inputs which data types are mismatched from Infer Request's inputs
468491
* inputs that should be in `BF16` data type
469492
* scalar inputs (i.e. `np.float_`/`str`/`bytes`/`int`/`float`)
470493
* lists of simple data types (i.e. `str`/`bytes`/`int`/`float`)
494+
471495
Keeps Tensor inputs "as-is".
472496
473497
Note: Use with extra care, shared data can be modified during runtime!
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# type: ignore
22
from . import py_tensorflow_frontend
3-
from . import utils
43
from __future__ import annotations
54
from openvino.frontend.tensorflow.py_tensorflow_frontend import ConversionExtensionTensorflow as ConversionExtension
65
from openvino.frontend.tensorflow.py_tensorflow_frontend import OpExtensionTensorflow as OpExtension
@@ -10,4 +9,4 @@ from openvino.frontend.tensorflow.py_tensorflow_frontend import _FrontEndPyGraph
109
Package: openvino
1110
Low level wrappers for the FrontEnd C++ API.
1211
"""
13-
__all__: list[str] = ['ConversionExtension', 'GraphIterator', 'OpExtension', 'py_tensorflow_frontend', 'utils']
12+
__all__: list[str] = ['ConversionExtension', 'GraphIterator', 'OpExtension', 'py_tensorflow_frontend']

src/bindings/python/src/openvino/frontend/tensorflow/utils.pyi

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/bindings/python/src/openvino/opset13/ops.pyi

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def bitwise_and(left, right, *args, **kwargs) -> openvino._pyopenvino.Node:
3535
3636
:param left_node: Tensor of integer or boolean datatype providing data.
3737
:param right_node: Tensor of integer or boolean datatype providing data.
38-
:param auto_broadcast: The type of broadcasting specifies rules used for auto-broadcasting of input tensors. Defaults to “NUMPY”.
38+
:param auto_broadcast: The type of broadcasting specifies rules used for
39+
auto-broadcasting of input tensors. Defaults to "NUMPY".
3940
:param name: The optional new name for output node.
4041
:return: The node performing bitwise AND operation on input nodes corresponding elements.
4142
@@ -59,7 +60,8 @@ def bitwise_or(left, right, *args, **kwargs) -> openvino._pyopenvino.Node:
5960
6061
:param left_node: Tensor of integer or boolean datatype providing data.
6162
:param right_node: Tensor of integer or boolean datatype providing data.
62-
:param auto_broadcast: The type of broadcasting specifies rules used for auto-broadcasting of input tensors. Defaults to “NUMPY”.
63+
:param auto_broadcast: The type of broadcasting specifies rules used for
64+
auto-broadcasting of input tensors. Defaults to "NUMPY".
6365
:param name: The optional new name for output node.
6466
:return: The node performing bitwise OR operation on input nodes corresponding elements.
6567
@@ -72,7 +74,8 @@ def bitwise_xor(left, right, *args, **kwargs) -> openvino._pyopenvino.Node:
7274
7375
:param left_node: Tensor of integer or boolean datatype providing data.
7476
:param right_node: Tensor of integer or boolean datatype providing data.
75-
:param auto_broadcast: The type of broadcasting specifies rules used for auto-broadcasting of input tensors. Defaults to “NUMPY”.
77+
:param auto_broadcast: The type of broadcasting specifies rules used for
78+
auto-broadcasting of input tensors. Defaults to "NUMPY".
7679
:param name: The optional new name for output node.
7780
:return: The node performing bitwise XOR operation on input nodes corresponding elements.
7881
@@ -149,15 +152,19 @@ def nms_rotated(*args, **kwargs) -> openvino._pyopenvino.Node:
149152
"""
150153
Return a node which performs NMSRotated.
151154
152-
:param boxes: Tensor with box coordinates of floating point type and shape [num_batches, num_boxes, 5],
153-
where the last dimension is defined as [x_ctr, y_ctr, width, height, angle_radians].
154-
:param scores: Tensor with box scores of floating point type and shape [num_batches, num_classes, num_boxes].
155-
:param max_output_boxes_per_class: Tensor (scalar or 1D) of integer type, specifying maximum number of boxes
156-
to be selected per class.
157-
:param iou_threshold: Tensor (scalar or 1D) of floating point type, specifying intersection over union threshold
158-
:param score_threshold: Tensor (scalar or 1D) of floating point type, specifying minimum score to consider box for the processing.
159-
:param sort_result_descending: Flag that specifies whenever it is necessary to sort selected
160-
boxes across batches or not.
155+
:param boxes: Tensor with box coordinates of floating point type and shape
156+
[num_batches, num_boxes, 5], where the last dimension is defined as
157+
[x_ctr, y_ctr, width, height, angle_radians].
158+
:param scores: Tensor with box scores of floating point type and shape
159+
[num_batches, num_classes, num_boxes].
160+
:param max_output_boxes_per_class: Tensor (scalar or 1D) of integer type, specifying
161+
maximum number of boxes to be selected per class.
162+
:param iou_threshold: Tensor (scalar or 1D) of floating point type, specifying
163+
intersection over union threshold
164+
:param score_threshold: Tensor (scalar or 1D) of floating point type, specifying
165+
minimum score to consider box for the processing.
166+
:param sort_result_descending: Flag that specifies whenever it is necessary to sort
167+
selected boxes across batches or not.
161168
:param output_type: Output element type.
162169
:param clockwise: Flag that specifies direction of the box rotation.
163170
:return: The new node which performs NMSRotated

src/bindings/python/src/openvino/opset14/ops.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ def convert_promote_types(*args, **kwargs) -> openvino._pyopenvino.Node:
4040
4141
:param left_node: input node with type to be promoted to common one.
4242
:param right_node: input node with type to be promoted to common one.
43-
:param promote_unsafe: Bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.
44-
:param pytorch_scalar_promotion: Bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.
45-
:param u64_integer_promotion_target: Element type attribute to select promotion result when inputs are u64 and signed integer.
43+
:param promote_unsafe: Bool attribute whether to allow promotions that might result
44+
in bit-widening, precision loss and undefined behaviors.
45+
:param pytorch_scalar_promotion: Bool attribute whether to promote scalar input to type
46+
provided by non-scalar input when number format is matching.
47+
:param u64_integer_promotion_target: Element type attribute to select promotion result
48+
when inputs are u64 and signed integer.
4649
:param name: Optional name for the new output node.
4750
4851
:return: The new node performing ConvertPromoteTypes operation.

src/bindings/python/src/openvino/opset16/ops.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ def segment_max(*args, **kwargs) -> openvino._pyopenvino.Node:
8585
8686
:param data: ND tensor of type T, the numerical data on which SegmentMax operation will be performed.
8787
:param segment_ids: 1D Tensor of sorted non-negative numbers, representing the segments.
88-
:param num_segments: An optional scalar value representing the segments count. If not provided, it is inferred from segment_ids.
89-
:param fill_mode: Responsible for the value assigned to segments which are empty. Can be "ZERO" or "LOWEST".
88+
:param num_segments: An optional scalar value representing the segments count.
89+
If not provided, it is inferred from segment_ids.
90+
:param fill_mode: Responsible for the value assigned to segments which are empty.
91+
Can be "ZERO" or "LOWEST".
9092
:param name: Optional name for the node.
9193
9294
:return: The new node performing SegmentMax operation.

src/bindings/python/src/openvino/opset9/ops.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,12 @@ def generate_proposals(*args, **kwargs) -> openvino._pyopenvino.Node:
4040
:param nms_threshold: Specifies threshold to be used in the NMS stage.
4141
:param pre_nms_count: Specifies number of top-n proposals before NMS.
4242
:param post_nms_count: Specifies number of top-n proposals after NMS.
43-
:param normalized: Specifies whether proposal bboxes are normalized or not. Optional attribute, default value is `True`.
44-
:param nms_eta: Specifies eta parameter for adaptive NMS., must be in range `[0.0, 1.0]`. Optional attribute, default value is `1.0`.
45-
:param roi_num_type: Specifies the element type of the third output `rpnroisnum`. Optional attribute, range of values: `i64` (default) or `i32`.
43+
:param normalized: Specifies whether proposal bboxes are normalized or not.
44+
Optional attribute, default value is `True`.
45+
:param nms_eta: Specifies eta parameter for adaptive NMS., must be in range `[0.0, 1.0]`.
46+
Optional attribute, default value is `1.0`.
47+
:param roi_num_type: Specifies the element type of the third output `rpnroisnum`.
48+
Optional attribute, range of values: `i64` (default) or `i32`.
4649
:param name: The optional name for the output node.
4750
:return: New node performing GenerateProposals operation.
4851

src/bindings/python/src/openvino/package_utils.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def classproperty(func: typing.Any) -> _ClassPropertyDescriptor:
3535
...
3636
def deprecated(name: typing.Any = None, version: str = '', message: str = '', stacklevel: int = 2) -> collections.abc.Callable[..., typing.Any]:
3737
"""
38-
Prints deprecation warning "{function_name} is deprecated and will be removed in version {version}. {message}" and runs the function.
38+
Prints deprecation warning and runs the function.
39+
40+
"{function_name} is deprecated and will be removed in version {version}. {message}"
3941
4042
:param version: The version in which the code will be removed.
4143
:param message: A message explaining why the function is deprecated and/or what to use instead.

0 commit comments

Comments
 (0)