[PyOV] AsyncInferQueue documentation notice about iteration limit (#18042)
This commit is contained in:
parent
52834659c4
commit
7fd394e87e
@ -120,6 +120,10 @@ The ``start_async`` function call is not required to be synchronized - it waits
|
||||
:language: python
|
||||
:fragment: [asyncinferqueue]
|
||||
|
||||
.. warning::
|
||||
|
||||
``InferRequest`` objects that can be acquired by iterating over a ``AsyncInferQueue`` object or by ``[id]`` guaranteed to work with read-only methods like getting tensors.
|
||||
Any mutating methods (e.g. start_async, set_callback) of a single request will put the parent AsyncInferQueue object in an invalid state.
|
||||
|
||||
Acquiring Results from Requests
|
||||
-------------------------------
|
||||
|
@ -280,6 +280,10 @@ class AsyncInferQueue(AsyncInferQueueBase):
|
||||
def __iter__(self) -> Iterable[InferRequest]:
|
||||
"""Allows to iterate over AsyncInferQueue.
|
||||
|
||||
Resulting objects are guaranteed to work with read-only methods like getting tensors.
|
||||
Any mutating methods (e.g. start_async, set_callback) of a single request
|
||||
will put the parent AsyncInferQueue object in an invalid state.
|
||||
|
||||
:return: a generator that yields InferRequests.
|
||||
:rtype: Iterable[openvino.runtime.InferRequest]
|
||||
"""
|
||||
@ -288,6 +292,10 @@ class AsyncInferQueue(AsyncInferQueueBase):
|
||||
def __getitem__(self, i: int) -> InferRequest:
|
||||
"""Gets InferRequest from the pool with given i id.
|
||||
|
||||
Resulting object is guaranteed to work with read-only methods like getting tensors.
|
||||
Any mutating methods (e.g. start_async, set_callback) of a request
|
||||
will put the parent AsyncInferQueue object in an invalid state.
|
||||
|
||||
:param i: InferRequest id.
|
||||
:type i: int
|
||||
:return: InferRequests from the pool with given id.
|
||||
|
Loading…
Reference in New Issue
Block a user