Skip to content
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] Extend Node with binary operations in openvino namespace #29243

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

almilosz
Copy link
Contributor

@almilosz almilosz commented Mar 3, 2025

Details:

  • Add std::variant NodeInput in _pyopenvino to mimic current definition.
  • Fix _pyopenvino.Node.__add__ and others.
  • Use operators directly, e.g. Add. Skip usage of NodeFactory.
  • Remove __div__ as it's Python2.x-only.
  • Keep deprecated node binary operators in openvino.runtime

Tickets:

Signed-off-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
Signed-off-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
@github-actions github-actions bot added the category: Python API OpenVINO Python bindings label Mar 3, 2025
@akuporos akuporos added this to the 2025.1 milestone Mar 3, 2025
almilosz added 3 commits March 3, 2025 15:36
Signed-off-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
Signed-off-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
Signed-off-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
@almilosz almilosz marked this pull request as ready for review March 3, 2025 16:03
@almilosz almilosz requested a review from a team as a code owner March 3, 2025 16:03
@@ -88,16 +88,6 @@
from openvino.utils import deprecated

# Extend Node class to support binary operators
Node.__add__ = opset13.add
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check that these also work for openvino.runtime ops?

Copy link
Contributor

@p-wysocki p-wysocki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any .py tests for these?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Python API OpenVINO Python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants