Skip to content

[OpenVINO BACKEND] - feat: implement numpy.median for openvino backend #21182

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 3 commits into
base: master
Choose a base branch
from

Conversation

sudonull-1
Copy link

@sudonull-1 sudonull-1 commented Apr 18, 2025

Copy link

google-cla bot commented Apr 18, 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.

@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.60%. Comparing base (50dae30) to head (430a2e7).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
keras/src/backend/openvino/numpy.py 91.30% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21182      +/-   ##
==========================================
+ Coverage   82.59%   82.60%   +0.01%     
==========================================
  Files         564      564              
  Lines       54407    54448      +41     
  Branches     8449     8466      +17     
==========================================
+ Hits        44936    44978      +42     
+ Misses       7396     7393       -3     
- Partials     2075     2077       +2     
Flag Coverage Δ
keras 82.41% <91.30%> (+0.01%) ⬆️
keras-jax 63.69% <0.00%> (-0.12%) ⬇️
keras-numpy 58.81% <0.00%> (-0.11%) ⬇️
keras-openvino 33.01% <91.30%> (+0.07%) ⬆️
keras-tensorflow 64.10% <0.00%> (-0.12%) ⬇️
keras-torch 63.78% <0.00%> (-0.12%) ⬇️

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.

@sudonull-1 sudonull-1 closed this Apr 18, 2025
@sudonull-1 sudonull-1 deleted the median_support_ov branch April 18, 2025 09:00
@sudonull-1 sudonull-1 reopened this Apr 18, 2025
@rkazants
Copy link
Contributor

Please fix tests failures:

Requested output shape [3] is incompatible with input shape
FAILED keras/src/ops/numpy_test.py::NumpyDtypeTest::test_median_int16 - AssertionError: 
- int16
+ float32
FAILED keras/src/ops/numpy_test.py::NumpyDtypeTest::test_median_int32 - AssertionError: 
- int32
+ float32
FAILED keras/src/ops/numpy_test.py::NumpyDtypeTest::test_median_int64 - AssertionError: 
- int64
+ float32
FAILED keras/src/ops/numpy_test.py::NumpyDtypeTest::test_median_int8 - AssertionError: 
- int8
+ float32
FAILED keras/src/ops/numpy_test.py::NumpyDtypeTest::test_median_none - RuntimeError: Check 'backward_compatible_check || in_out_elements_equal' failed at src/core/shape_inference/include/reshape_shape_inference.hpp:370:
While validating node 'opset1::Reshape Reshape_3802654 (opset1::Constant Constant_3802649[0]:f32[], opset8::Gather 
...

@sudonull-1
Copy link
Author

sudonull-1 commented Apr 21, 2025

@rkazants
Currently passing all the testcases, Code format is failing due to

/opt/hostedtoolcache/Python/3.10.17/x64/lib/python3.10/site-packages/openvino/runtime/init.py:10: DeprecationWarning: The openvino.runtime module is deprecated and will be removed in the 2026.0 release. Please replace openvino.runtime with openvino.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue][Keras 3 OpenVINO Backend]: Support numpy.median operation
4 participants