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
[Py OV] Update samples to use __version__ instead of get_version() (#28717)
Alicja Miloszewskad64c8d476b2d
diff --git a/samples/python/benchmark/bert_benchmark/README.md b/samples/python/benchmark/bert_benchmark/README.mdindex 2894c5f33d6..423ba9b9188 100644--- a/samples/python/benchmark/bert_benchmark/README.md+++ b/samples/python/benchmark/bert_benchmark/README.md@@ -12,7 +12,7 @@ The following Python API is used in the application:| Feature | API | Description || -------------------------| ------------------------------------------------|----------------------------------------------|-| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |+| OpenVINO API Version | [openvino.\_\_version__] | Get Openvino API version. || Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model. || | [openvino.runtime.Core.compile_model] | || Asynchronous Infer | [openvino.runtime.AsyncInferQueue], | Do asynchronous inference. |diff --git a/samples/python/benchmark/bert_benchmark/bert_benchmark.py b/samples/python/benchmark/bert_benchmark/bert_benchmark.pyindex bd59c2bd2b3..30770472960 100755--- a/samples/python/benchmark/bert_benchmark/bert_benchmark.py+++ b/samples/python/benchmark/bert_benchmark/bert_benchmark.py@@ -11,7 +11,6 @@ from time import perf_counterimport openvino as ovimport datasets-from openvino import get_versionfrom transformers import AutoTokenizerfrom transformers.onnx import exportfrom transformers.onnx.features import FeaturesManager@@ -20,7 +19,7 @@ from transformers.onnx.features import FeaturesManagerdef main():log.basicConfig(format='[ %(levelname)s ] %(message)s', level=log.INFO, stream=sys.stdout)log.info('OpenVINO:')- log.info(f"{'Build ':.<39} {get_version()}")+ log.info(f"{'Build ':.<39} {ov.__version__}")model_name = 'bert-base-uncased'# Download the modeltransformers_model = FeaturesManager.get_model_from_feature('default', model_name)diff --git a/samples/python/benchmark/sync_benchmark/README.md b/samples/python/benchmark/sync_benchmark/README.mdindex c7604386625..e620ca60512 100644--- a/samples/python/benchmark/sync_benchmark/README.md+++ b/samples/python/benchmark/sync_benchmark/README.md@@ -19,7 +19,7 @@ The following Python API is used in the application:| Feature | API | Description || --------------------------| ------------------------------------------------|----------------------------------------------|-| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |+| OpenVINO API Version | [openvino.\_\_version__] | Get Openvino API version. || Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, || | [openvino.runtime.Core.compile_model], | configure input tensors. || | [openvino.runtime.InferRequest.get_tensor] | |diff --git a/samples/python/benchmark/sync_benchmark/sync_benchmark.py b/samples/python/benchmark/sync_benchmark/sync_benchmark.pyindex db877b7238f..0fcf71c56cc 100755--- a/samples/python/benchmark/sync_benchmark/sync_benchmark.py+++ b/samples/python/benchmark/sync_benchmark/sync_benchmark.py@@ -10,7 +10,6 @@ from time import perf_counterimport numpy as npimport openvino as ov-from openvino import get_versionfrom openvino.utils.types import get_dtype@@ -29,7 +28,7 @@ def fill_tensor_random(tensor):def main():log.basicConfig(format='[ %(levelname)s ] %(message)s', level=log.INFO, stream=sys.stdout)log.info('OpenVINO:')- log.info(f"{'Build ':.<39} {get_version()}")+ log.info(f"{'Build ':.<39} {ov.__version__}")device_name = 'CPU'if len(sys.argv) == 3:device_name = sys.argv[2]diff --git a/samples/python/benchmark/throughput_benchmark/README.md b/samples/python/benchmark/throughput_benchmark/README.mdindex 5214c1190bb..dea73615570 100644--- a/samples/python/benchmark/throughput_benchmark/README.md+++ b/samples/python/benchmark/throughput_benchmark/README.md@@ -21,7 +21,7 @@ The following Python API is used in the application:| Feature | API | Description || --------------------------| ------------------------------------------------|----------------------------------------------|-| OpenVINO Runtime Version | [openvino.runtime.get_version] | Get Openvino API version. |+| OpenVINO API Version | [openvino.\_\_version__] | Get Openvino API version. || Basic Infer Flow | [openvino.runtime.Core], | Common API to do inference: compile a model, || | [openvino.runtime.Core.compile_model] | configure input tensors. || | [openvino.runtime.InferRequest.get_tensor] | |diff --git a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.pyindex c96179d74ed..b5c5b105c85 100755--- a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py+++ b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py@@ -10,7 +10,6 @@ from time import perf_counterimport numpy as npimport openvino as ov-from openvino import get_versionfrom openvino.utils.types import get_dtype@@ -29,7 +28,7 @@ def fill_tensor_random(tensor):def main():log.basicConfig(format='[ %(levelname)s ] %(message)s', level=log.INFO, stream=sys.stdout)log.info('OpenVINO:')- log.info(f"{'Build ':.<39} {get_version()}")+ log.info(f"{'Build ':.<39} {ov.__version__}")device_name = 'CPU'if len(sys.argv) == 3:device_name = sys.argv[2]