Skip to content

Add support for numpy.flip in OpenVINO backend#21132

Closed
PraroopChanda wants to merge 2 commits intokeras-team:masterfrom
PraroopChanda:openvino-flip-support
Closed

Add support for numpy.flip in OpenVINO backend#21132
PraroopChanda wants to merge 2 commits intokeras-team:masterfrom
PraroopChanda:openvino-flip-support

Conversation

@PraroopChanda
Copy link
Copy Markdown

@PraroopChanda PraroopChanda commented Apr 4, 2025

Summary

Fixes openvinotoolkit/openvino#29359
This PR adds OpenVINO backend support for numpy.flip in Keras 3.

Please Review the PR @rkazants

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 4, 2025

Codecov Report

❌ Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.69%. Comparing base (7ed8edb) to head (3c98d30).
⚠️ Report is 755 commits behind head on master.

Files with missing lines Patch % Lines
keras/src/backend/openvino/numpy.py 68.42% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21132      +/-   ##
==========================================
- Coverage   82.70%   82.69%   -0.01%     
==========================================
  Files         564      564              
  Lines       54159    54178      +19     
  Branches     8414     8418       +4     
==========================================
+ Hits        44792    44805      +13     
- Misses       7294     7297       +3     
- Partials     2073     2076       +3     
Flag Coverage Δ
keras 82.50% <68.42%> (-0.01%) ⬇️
keras-jax 64.04% <0.00%> (-0.03%) ⬇️
keras-numpy 59.06% <0.00%> (-0.03%) ⬇️
keras-openvino 32.93% <68.42%> (+0.01%) ⬆️
keras-tensorflow 64.32% <0.00%> (-0.03%) ⬇️
keras-torch 64.08% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gbaned
Copy link
Copy Markdown
Collaborator

gbaned commented Apr 8, 2025

Hi @PraroopChanda Can you please resolve the conflicts? Thank you!

@PraroopChanda
Copy link
Copy Markdown
Author

PraroopChanda commented Apr 8, 2025

Hi @PraroopChanda Can you please resolve the conflicts? Thank you!

Done.

@rkazants
Copy link
Copy Markdown
Contributor

rkazants commented Apr 8, 2025

DO NOT merge! Need review.

NumpyOneInputOpsCorrectnessTest::test_diag
NumpyOneInputOpsCorrectnessTest::test_diagonal
NumpyOneInputOpsCorrectnessTest::test_exp2
NumpyOneInputOpsCorrectnessTest::test_expm1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please revert this change that is not related to PR

NumpyOneInputOpsCorrectnessTest::test_diagonal
NumpyOneInputOpsCorrectnessTest::test_exp2
NumpyOneInputOpsCorrectnessTest::test_expm1
NumpyOneInputOpsCorrectnessTest::test_flip
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please remove the line with NumpyOneInputOpsCorrectnessTest::test_flip

Comment on lines +743 to +746
reversed_indices = ov_opset.range(start, stop, step, Type.i64).output(0)
x = ov_opset.gather(
x, reversed_indices, ov_opset.constant(ax, Type.i64).output(0)
).output(0)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @rkazants ,
I have a few prior deadlines this week, so I might need a bit of time to incorporate the requested changes.
I’ll get to it as soon as possible.

Thank you for your patience!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 4, 2025

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.

@github-actions github-actions Bot added the stale label Sep 4, 2025
@github-actions
Copy link
Copy Markdown

This PR was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

@github-actions github-actions Bot closed this Sep 18, 2025
@github-project-automation github-project-automation Bot moved this from Assigned Reviewer to Closed/Rejected in PR Queue Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed/Rejected

Development

Successfully merging this pull request may close these issues.

[Good First Issue][Keras 3 OpenVINO Backend]: Support numpy.flip operation

6 participants