Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Py OV] Update samples with import from openvino directly (#28341)

Alicja Miloszewska54a4f1c08808
diff --git a/samples/python/benchmark/bert_benchmark/bert_benchmark.py b/samples/python/benchmark/bert_benchmark/bert_benchmark.py
index 11055d7a70b..bd59c2bd2b3 100755
--- a/samples/python/benchmark/bert_benchmark/bert_benchmark.py
+++ b/samples/python/benchmark/bert_benchmark/bert_benchmark.py
@@ -11,7 +11,7 @@ from time import perf_counter
import openvino as ov
import datasets
-from openvino.runtime import get_version
+from openvino import get_version
from transformers import AutoTokenizer
from transformers.onnx import export
from transformers.onnx.features import FeaturesManager
diff --git a/samples/python/benchmark/sync_benchmark/sync_benchmark.py b/samples/python/benchmark/sync_benchmark/sync_benchmark.py
index 6aed1a489e1..db877b7238f 100755
--- a/samples/python/benchmark/sync_benchmark/sync_benchmark.py
+++ b/samples/python/benchmark/sync_benchmark/sync_benchmark.py
@@ -10,8 +10,8 @@ from time import perf_counter
import numpy as np
import openvino as ov
-from openvino.runtime import get_version
-from openvino.runtime.utils.types import get_dtype
+from openvino import get_version
+from openvino.utils.types import get_dtype
def fill_tensor_random(tensor):
diff --git a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py
index ce9431e3e51..c96179d74ed 100755
--- a/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py
+++ b/samples/python/benchmark/throughput_benchmark/throughput_benchmark.py
@@ -10,8 +10,8 @@ from time import perf_counter
import numpy as np
import openvino as ov
-from openvino.runtime import get_version
-from openvino.runtime.utils.types import get_dtype
+from openvino import get_version
+from openvino.utils.types import get_dtype
def fill_tensor_random(tensor):
diff --git a/samples/python/model_creation_sample/model_creation_sample.py b/samples/python/model_creation_sample/model_creation_sample.py
index 1a9fdac84fa..8572051b577 100755
--- a/samples/python/model_creation_sample/model_creation_sample.py
+++ b/samples/python/model_creation_sample/model_creation_sample.py
@@ -9,7 +9,7 @@ from functools import reduce
import numpy as np
import openvino as ov
-from openvino.runtime import op, opset1, opset8
+from openvino import op, opset1, opset8
from data import digits