-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] Alias classes and functions in flatten openvino namespace #28085
Open
almilosz
wants to merge
10
commits into
openvinotoolkit:master
Choose a base branch
from
almilosz:almilosz/alias-classes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Alicja Miloszewska <[email protected]>
…into almilosz/alias-classes Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
github-actions
bot
added
category: Python API
OpenVINO Python bindings
category: tools
OpenVINO C++ / Python tools
category: OVC
OVC tool
labels
Dec 16, 2024
Signed-off-by: Alicja Miloszewska <[email protected]>
…into almilosz/alias-classes Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
Signed-off-by: Alicja Miloszewska <[email protected]>
rkazants
reviewed
Dec 17, 2024
Comment on lines
+93
to
+110
# Extend Node class to support binary operators | ||
Node.__add__ = opset13.add | ||
Node.__sub__ = opset13.subtract | ||
Node.__mul__ = opset13.multiply | ||
Node.__div__ = opset13.divide | ||
Node.__truediv__ = opset13.divide | ||
Node.__radd__ = lambda left, right: opset13.add(right, left) | ||
Node.__rsub__ = lambda left, right: opset13.subtract(right, left) | ||
Node.__rmul__ = lambda left, right: opset13.multiply(right, left) | ||
Node.__rdiv__ = lambda left, right: opset13.divide(right, left) | ||
Node.__rtruediv__ = lambda left, right: opset13.divide(right, left) | ||
Node.__eq__ = utils.deprecated(version="2025.3", message="Use ops.equal instead")(opset13.equal) | ||
Node.__ne__ = utils.deprecated(version="2025.3", message="Use ops.not_equal instead")(opset13.not_equal) | ||
Node.__lt__ = utils.deprecated(version="2025.3", message="Use ops.less instead")(opset13.less) | ||
Node.__le__ = utils.deprecated(version="2025.3", message="Use ops.less_equal instead")(opset13.less_equal) | ||
Node.__gt__ = utils.deprecated(version="2025.3", message="Use ops.greater instead")(opset13.greater) | ||
Node.__ge__ = utils.deprecated(version="2025.3", message="Use ops.greater_equal instead")(opset13.greater_equal) | ||
|
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.
we don't need it here. You can extend it in one place and re-use it overall.
Let say in py file for Node class that is more logical to have
Signed-off-by: Alicja Miloszewska <[email protected]>
…into almilosz/alias-classes Signed-off-by: Alicja Miloszewska <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category: OVC
OVC tool
category: Python API
OpenVINO Python bindings
category: tools
OpenVINO C++ / Python tools
do_not_merge
do_not_review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details:
__init__.py
Tickets: