Skip to content

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

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

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

Conversation

geeky33
Copy link

@geeky33 geeky33 commented Mar 25, 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:

#29116

Concerned Authority:

CC: @rkazants

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2025

Codecov Report

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

Project coverage is 82.63%. Comparing base (8333ef4) to head (625445e).

Files with missing lines Patch % Lines
keras/src/backend/openvino/numpy.py 6.25% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21086      +/-   ##
==========================================
- 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% <6.25%> (-0.05%) ⬇️
keras-jax 64.00% <0.00%> (-0.04%) ⬇️
keras-numpy 59.09% <0.00%> (-0.04%) ⬇️
keras-openvino 32.84% <6.25%> (-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.

@geeky33 geeky33 changed the title Implemented the support for numpy.diagonal operation [OpenVINO Backend] Support: Implemented numpy.diagonal for keras ov backend Mar 25, 2025
@@ -1,5 +1,5 @@
import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

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

switch on the corresponding tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

4 participants