-
Notifications
You must be signed in to change notification settings - Fork 19.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
[POC][OV] Support OpenVINO as Keras 3 backend #19727
base: master
Are you sure you want to change the base?
[POC][OV] Support OpenVINO as Keras 3 backend #19727
Conversation
Signed-off-by: Kazantsev, Roman <[email protected]>
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Thanks for the PR!
@@ -289,6 +291,9 @@ def __init__( | |||
self._convert_input_args = True | |||
# Whether to allow non-tensors as positional arguments in `call()`. | |||
self._allow_non_tensor_positional_args = False | |||
if backend.backend() == "openvino": |
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.
This should not be backend-specific.
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.
Hi @fchollet, please advice how to avoid this code. Keras common requires it to be of KerasTensor
type during calling op-by-op. How to relax this check and allow to pass ov type object into ops wrappers?
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19727 +/- ##
==========================================
- Coverage 78.91% 78.03% -0.88%
==========================================
Files 510 522 +12
Lines 48590 49460 +870
Branches 8960 9059 +99
==========================================
+ Hits 38344 38596 +252
- Misses 8391 9000 +609
- Partials 1855 1864 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi @rkazants Can you please resolve the conflicts? Thank you! |
I am working on this PR. I am trying to resolve comments. Best regards, |
Hi @rkazants Any update on this PR? Please. Thank you! |
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
I am just back from vacation. I plan to continue from the next week. |
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
Hi @rkazants Any update on this PR? Please. Thank you! |
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
@fchollet, please review. all other comments are addressed. |
Signed-off-by: Kazantsev, Roman <[email protected]>
@fchollet, Thanks, |
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Signed-off-by: Kazantsev, Roman <[email protected]>
Hi @fchollet, look forward to receive your review:) Thanks in advance, |
@fchollet, kindly reminder about review. Thank you, |
Details: Support OpenVINO as Keras 3 backend. This is inference-only backend. In order to switch on this, define environment variable as follows:
os.environ["KERAS_BACKEND"] = "openvino"
or useset_backend
.Here is an example how it works:
Install OpenVINO
pip install openvino -U