-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Py OV] Add utils to openvino module #28062
[Py OV] Add utils to openvino module #28062
Conversation
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
from openvino.utils import _add_openvino_libs_to_search_path | ||
from openvino.package_utils import _add_openvino_libs_to_search_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not touch it please because we are removing it this release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately there are still some samples that depend on it.
I had to touch it because wheels_windows_vs2019_release
CI failed.
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2018-2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should raise a warning about its deprecation since 2025 and our intention to remove in 2026 release.
It relates all runtime
modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a task to raise a warning about runtime
deprecation. You can track the progress here in jira
src/bindings/python/src/openvino/runtime/opset_utils/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/opset_utils/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/reduction/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/node_factory/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/data_helpers/data_dispatcher/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/data_helpers/wrappers/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/decorators/__init__.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Anastasia Kuporosova <[email protected]>
src/bindings/python/src/openvino/runtime/utils/broadcasting/__init__.py
Outdated
Show resolved
Hide resolved
src/bindings/python/src/openvino/runtime/utils/types/__init__.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Co-authored-by: Anastasia Kuporosova <[email protected]>
### Details: - Move `runtime/utils/` to openvino - Add proxy locations in `openvino/runtime/utils/` - create proxy for `openvino/runtime/opset_utils.py`. It contained one internal function => `_get_node_factory`. Move its location to `openvino/utils/node_factory.py`. - Rename `utils.py` to `package_utils.py`. Import its functionality in `openvino/utils/__init__.py` so it's accessible for a user in the same way (except internal `_add_openvino_libs_to_search_path` and `_ClassPropertyDescriptor`) NOTE: on Windows `_add_openvino_libs_to_search_path` has to be called (and initialized) on top of `openvino.__init__`, especially before `_pyopenvino` imports. Part of `openvino.runtime` deprecation ### Tickets: [CVS-129450](https://jira.devtools.intel.com/browse/CVS-129450) --------- Signed-off-by: Alicja Miloszewska <[email protected]> Co-authored-by: Anastasia Kuporosova <[email protected]>
This reverts commit 1dd6492.
### Details: - An [Issue](https://jira.devtools.intel.com/browse/CVS-159892) appeared after moving `openvino.runtime.utils` ([PR28062]( #28062)). On `openvino` import, `op` was initialized [here](https://github.com/openvinotoolkit/openvino/blob/26e5fe9a5961502eb3086424ce68496c9a4d7a30/src/bindings/python/src/openvino/runtime/utils/types.py#L14) alongside utils. I propose to initialize `op` explicitly in `openvino/runtime/__init__.py` and `openvino/__init__.py` - Initialize ops.py in `runtime/opset*/` as they are present in the `sys.modules` for `2024.6-openvino` and some users may access operators directly from there. ### Tickets: - https://jira.devtools.intel.com/browse/CVS-159892 --------- Signed-off-by: Alicja Miloszewska <[email protected]>
### Details: Add deprecation warning for `openvino.runtime` that will be shown **ONCE** when sb will access runtime functionality for the first time. Examples: ![Screenshot 2025-01-10 114701](https://github.com/user-attachments/assets/4229ede3-3b86-418a-8dbf-f230ff91983b) ![warn_updated](https://github.com/user-attachments/assets/4b4a7c56-c5ca-4b7b-8b34-f89f3a4bc627) `openvino.runtime` funtionality was added to openvino namespace in these PRs: - #27785 - #27902 - #28007 - #28062 - #28085 Internal calls in `openvino` module also triggered warning, so they were updated: - #28166 - #28356 ### Tickets: - [CVS-129451](https://jira.devtools.intel.com/browse/CVS-129451) --------- Signed-off-by: Alicja Miloszewska <[email protected]> Co-authored-by: Anastasia Kuporosova <[email protected]>
Details:
runtime/utils/
to openvinoopenvino/runtime/utils/
openvino/runtime/opset_utils.py
. It contained one internal function =>_get_node_factory
. Move its location toopenvino/utils/node_factory.py
.utils.py
topackage_utils.py
. Import its functionality inopenvino/utils/__init__.py
so it's accessible for a user in the same way (except internal_add_openvino_libs_to_search_path
and_ClassPropertyDescriptor
)NOTE: on Windows
_add_openvino_libs_to_search_path
has to be called (and initialized) on top ofopenvino.__init__
, especially before_pyopenvino
imports.Part of
openvino.runtime
deprecationTickets:
CVS-129450