[PyOV] Deprecate python IE and nG API (#17791)
This commit is contained in:
parent
dcba37d897
commit
d95c49d888
@ -193,6 +193,15 @@ from ngraph.opset11 import unique
|
||||
from ngraph.opset11 import unsqueeze
|
||||
from ngraph.opset11 import variadic_split
|
||||
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
message="OpenVINO nGraph Python API is deprecated and will be removed in 2024.0 release."
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html",
|
||||
category=FutureWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
# Extend Node class to support binary operators
|
||||
Node.__add__ = add
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
|
||||
if sys.platform == "win32":
|
||||
# Installer, yum, pip installs openvino dlls to the different directories
|
||||
@ -29,5 +31,13 @@ if sys.platform == "win32":
|
||||
|
||||
from .ie_api import *
|
||||
|
||||
warnings.warn(
|
||||
message="OpenVINO Inference Engine Python API is deprecated and will be removed in 2024.0 release."
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html",
|
||||
category=FutureWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
__all__ = ["IENetwork", "TensorDesc", "IECore", "Blob", "PreProcessInfo", "get_version"]
|
||||
__version__ = get_version() # type: ignore
|
||||
|
@ -65,6 +65,9 @@ def read_network(path_to_xml : str, path_to_bin : str):
|
||||
|
||||
cdef class VariableState:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class manages data for reset operations
|
||||
"""
|
||||
|
||||
@ -100,8 +103,12 @@ cdef class VariableState:
|
||||
|
||||
cdef class TensorDesc:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class defines Tensor description
|
||||
"""
|
||||
|
||||
def __eq__(self, other : TensorDesc):
|
||||
return self.layout == other.layout and self.precision == other.precision and self.dims == other.dims
|
||||
|
||||
@ -168,6 +175,9 @@ cdef class TensorDesc:
|
||||
|
||||
cdef class Blob:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class represents Blob
|
||||
"""
|
||||
|
||||
@ -312,6 +322,9 @@ cdef class Blob:
|
||||
## This class represents an Inference Engine entity and allows you to manipulate with plugins using unified interfaces.
|
||||
cdef class IECore:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class represents an Inference Engine entity and allows you to manipulate with plugins using unified interfaces.
|
||||
"""
|
||||
|
||||
@ -660,8 +673,12 @@ cdef class IECore:
|
||||
|
||||
cdef class PreProcessChannel:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This structure stores info about pre-processing of network inputs (scale, mean image, ...)
|
||||
"""
|
||||
|
||||
property mean_value:
|
||||
def __get__(self):
|
||||
return deref(self._ptr).meanValue
|
||||
@ -686,8 +703,12 @@ cdef class PreProcessChannel:
|
||||
|
||||
cdef class PreProcessInfo:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class stores pre-process information for the input
|
||||
"""
|
||||
|
||||
def __cinit__(self):
|
||||
self._ptr = new CPreProcessInfo()
|
||||
self._cptr = self._ptr
|
||||
@ -812,6 +833,9 @@ cdef class PreProcessInfo:
|
||||
|
||||
cdef class InputInfoPtr:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class contains information about each input of the network
|
||||
"""
|
||||
|
||||
@ -897,10 +921,13 @@ cdef class InputInfoPtr:
|
||||
|
||||
cdef class InputInfoCPtr:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class contains const information about each input of the network.
|
||||
Provides same interface as InputInfoPtr object except properties setters
|
||||
"""
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
@ -942,9 +969,12 @@ cdef class InputInfoCPtr:
|
||||
|
||||
cdef class DataPtr:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class is the layer data representation.
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Default constructor
|
||||
@ -1002,6 +1032,9 @@ cdef class DataPtr:
|
||||
|
||||
cdef class CDataPtr:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class is the layer constant data representation. Provides same interface as DataPtr object except properties setters
|
||||
"""
|
||||
|
||||
@ -1043,6 +1076,9 @@ cdef class CDataPtr:
|
||||
|
||||
cdef class ExecutableNetwork:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class represents a network instance loaded to plugin and ready for inference.
|
||||
"""
|
||||
|
||||
@ -1294,10 +1330,13 @@ ctypedef extern void (*cb_type)(void*, int) with gil
|
||||
|
||||
cdef class InferRequest:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
This class provides an interface to infer requests of :class:`ExecutableNetwork` and serves
|
||||
to handle infer requests execution and to set and get output data.
|
||||
"""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
There is no explicit class constructor. To make a valid :class:`InferRequest` instance, use :func:`IECore.load_network`
|
||||
@ -1554,6 +1593,10 @@ cdef class InferRequest:
|
||||
|
||||
|
||||
cdef class IENetwork:
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
"""
|
||||
## Class constructor
|
||||
#
|
||||
# @param model: A PyCapsule containing smart pointer to nGraph function.
|
||||
@ -1728,7 +1771,12 @@ cdef class IENetwork:
|
||||
return self.impl.getOVNameForTensor(name).decode('utf-8')
|
||||
|
||||
cdef class BlobBuffer:
|
||||
"""Copy-less accessor for Inference Engine Blob"""
|
||||
"""
|
||||
OpenVINO Inference Engine Python API is deprecated and will be removed in the 2024.0 release. For instructions on
|
||||
transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html
|
||||
|
||||
Copy-less accessor for Inference Engine Blob
|
||||
"""
|
||||
|
||||
cdef reset(self, CBlob.Ptr & ptr, vector[size_t] representation_shape = []):
|
||||
self.ptr = ptr
|
||||
|
Loading…
Reference in New Issue
Block a user