Skip to content

[OpenVINO Backend] Support numpy min operation #21168

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

Conversation

srinjoydutta03
Copy link

@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.60%. Comparing base (2111fbc) to head (218158f).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21168      +/-   ##
==========================================
- Coverage   82.69%   82.60%   -0.09%     
==========================================
  Files         564      564              
  Lines       54223    54434     +211     
  Branches     8424     8456      +32     
==========================================
+ Hits        44837    44963     +126     
- Misses       7310     7396      +86     
+ Partials     2076     2075       -1     
Flag Coverage Δ
keras 82.41% <100.00%> (-0.09%) ⬇️
keras-jax 63.77% <0.00%> (-0.15%) ⬇️
keras-numpy 58.89% <0.00%> (-0.14%) ⬇️
keras-openvino 32.99% <100.00%> (+<0.01%) ⬆️
keras-tensorflow 64.18% <0.00%> (-0.12%) ⬇️
keras-torch 63.86% <0.00%> (-0.13%) ⬇️

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.

@@ -35,7 +35,6 @@ NumpyDtypeTest::test_max
NumpyDtypeTest::test_mean
NumpyDtypeTest::test_median
NumpyDtypeTest::test_meshgrid
NumpyDtypeTest::test_min
NumpyDtypeTest::test_moveaxis
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add line with NumpyDtypeTest::test_minimum_python_types

Copy link
Author

Choose a reason for hiding this comment

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

I have added it. Thank you!

Comment on lines 1019 to 1023
is_empty = False
for dim in x_shape:
if dim == 0:
is_empty = True
break
Copy link
Contributor

Choose a reason for hiding this comment

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

let us skip is_empty case at all because this is invalid case for which it throws exception.
We assume that x is not empty always.

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove is_empty case related code

Copy link
Author

Choose a reason for hiding this comment

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

I have removed the is_empty case. Thanks


return OpenVINOKerasTensor(result)

if axis is None and initial is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

let us handle initial input at the final step. It is the same for all cases.

Copy link
Author

Choose a reason for hiding this comment

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

Handled at the end. Thanks

Comment on lines 1076 to 1077
if is_bool:
result = ov_opset.convert(result, Type.boolean).output(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

let us handle it finally. It same for all cases

Copy link
Author

Choose a reason for hiding this comment

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

Handled finally. Thanks

@srinjoydutta03
Copy link
Author

@rkazants Could you please review the changes?

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.

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