Skip to content

[OpenVINO Backend] Support: Implemented numpy.diagonal for keras ov backend #21028

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

Closed
wants to merge 2 commits into from

Conversation

geeky33
Copy link

@geeky33 geeky33 commented Mar 13, 2025

  • 1. Implemented a diagonal function similar to diag, handling 2D+ tensors.
  • 2. Extracted diagonals based on the given axis1, axis2, and offset (k).
  • 3. Used OpenVINO ops like gather or gather_nd to fetch diagonal elements.

Ticket Id:

openvinotoolkit/openvino#29116

Concerned Authority:

CC: @rkazants

Copy link

google-cla bot commented Mar 13, 2025

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.

@geeky33
Copy link
Author

geeky33 commented Mar 13, 2025

Filled the CLA

Apologies
Didn't know I had to do it.

Thanks and Regards.

@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 3.22581% with 30 lines in your changes missing coverage. Please review.

Project coverage is 82.63%. Comparing base (8333ef4) to head (49e1c3e).

Files with missing lines Patch % Lines
keras/src/backend/openvino/numpy.py 3.22% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21028      +/-   ##
==========================================
- Coverage   82.68%   82.63%   -0.05%     
==========================================
  Files         564      564              
  Lines       54114    54144      +30     
  Branches     8410     8415       +5     
==========================================
  Hits        44743    44743              
- Misses       7293     7323      +30     
  Partials     2078     2078              
Flag Coverage Δ
keras 82.44% <3.22%> (-0.05%) ⬇️
keras-jax 64.00% <0.00%> (-0.04%) ⬇️
keras-numpy 59.09% <0.00%> (-0.04%) ⬇️
keras-openvino 32.84% <3.22%> (-0.02%) ⬇️
keras-tensorflow 64.33% <0.00%> (-0.04%) ⬇️
keras-torch 64.05% <0.00%> (-0.04%) ⬇️

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.

@rkazants
Copy link
Contributor

@geeky33, you have a lot of unneeded changes in PR:
{9D5262DA-A41D-49F8-AC84-2F41DFDE5BC7}

do NOT merge!!!

@geeky33 geeky33 closed this Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants