[OpenVINO] Implement nanmedian and nanpercentile ops#22762
[OpenVINO] Implement nanmedian and nanpercentile ops#22762hertschuh merged 3 commits intokeras-team:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements nanmedian and nanpercentile for the OpenVINO backend and enables the corresponding tests. The current implementation of nanmedian is overly complex and contains a bug where keepdims=True does not correctly restore the original rank for multi-axis reductions. Additionally, it fails to cast integer or boolean scalars to float, which is inconsistent with NumPy's behavior. It is recommended to simplify the logic by using the existing nanquantile function.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22762 +/- ##
===========================================
+ Coverage 59.77% 83.03% +23.25%
===========================================
Files 596 596
Lines 69820 69822 +2
Branches 10883 10883
===========================================
+ Hits 41737 57976 +16239
+ Misses 25575 8998 -16577
- Partials 2508 2848 +340
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
hertschuh
left a comment
There was a problem hiding this comment.
Thanks for implementing those.
Description
ops
nanmedianandnanpercentilewere added to keras.ops in #22585 and #22679. This PR implements both for the OpenVINO backend.Closes: openvinotoolkit/openvino/issues/35502
Contributor Agreement
Please check all boxes below before submitting your PR for review: