Skip to content

Conversation

Raghavyadav17
Copy link

@Raghavyadav17 Raghavyadav17 commented Mar 18, 2025

Implemented all the necessary mentioned in the issue:

  1. Provide decomposition in Python for numpy.flip using OpenVINO opset

  2. Include tests by removing line corresponding to the implemented operation in excluded_concrete_tests.txt file.

  3. create pytest.ini file and place it in the root directory of the clone repository. This file should contain the following content:
    [pytest]
    env =
    KERAS_BACKEND=openvino

    @rkazants please review this PR :)

    Fixes [Good First Issue][Keras 3 OpenVINO Backend]: Support numpy.flip operation openvinotoolkit/openvino#29359

@Raghavyadav17 Raghavyadav17 changed the title Raghav/29359 Updated numpy.flip using openvino opset Mar 18, 2025
@gbaned gbaned requested a review from mattdangerw March 18, 2025 11:55
@gbaned gbaned added this to PR Queue Mar 18, 2025
@github-project-automation github-project-automation bot moved this to Assigned Reviewer in PR Queue Mar 18, 2025
@p-wysocki
Copy link
Contributor

bump @rkazants

@gbaned
Copy link
Collaborator

gbaned commented Mar 25, 2025

Hi @Raghavyadav17 Can you please resolve the conflicts? Thank you!

@Raghavyadav17
Copy link
Author

@gbaned apologies for not looking at it earlier, will resolve it ASAP!!!

@Raghavyadav17
Copy link
Author

@gbaned resolved the conflict :)

@rkazants
Copy link
Contributor

Pls do NOT merge!!!

Comment on lines 36 to 37
NumpyDtypeTest::test_log1p
NumpyDtypeTest::test_log10

Copy link
Contributor

Choose a reason for hiding this comment

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

revert this change.

NumpyDtypeTest::test_log10

NumpyDtypeTest::test_log
NumpyDtypeTest::test_logspace
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 also NumpyDtypeTest::test_flip

NumpyOneInputOpsCorrectnessTest::test_exp2
NumpyOneInputOpsCorrectnessTest::test_expm1
NumpyOneInputOpsCorrectnessTest::test_flip

Copy link
Contributor

Choose a reason for hiding this comment

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

remove this blank line. not needed

Comment on lines 864 to 868
def log1p(x):
raise NotImplementedError("`log1p` is not supported with openvino backend")
x=get_ov_output(x)
one=ov_opset.constant(1.0,dtype=x.dtype)
return OpenVINOKerasTensor(ov_opset.log(ov_opset.add(x,one)).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.

why it is here? It is needed for different PR. pls remove

Copy link
Author

Choose a reason for hiding this comment

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

@rkazants my bad will remove it !!

pytest.ini Outdated
Comment on lines 1 to 3
[pytest]
env =
KERAS_BACKEND=openvino No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

remove this file

Comment on lines 9 to 11
torch==2.6.0+cpu
torch-xla==2.6.0;sys_platform != 'darwin'
#torch-xla==2.6.0;sys_platform != 'darwin'

Copy link
Contributor

Choose a reason for hiding this comment

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

revert

@Raghavyadav17
Copy link
Author

hi @rkazants working on the fixing the reviewed changes asap

@Raghavyadav17
Copy link
Author

@rkazants hi roman, made all the necessary changes you mentioned, please review them !!
Thanks

@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 80.15%. Comparing base (6e688ab) to head (d92cf16).
Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
keras/src/backend/openvino/numpy.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21057      +/-   ##
==========================================
- Coverage   82.47%   80.15%   -2.32%     
==========================================
  Files         563      564       +1     
  Lines       53834    54138     +304     
  Branches     8359     8412      +53     
==========================================
- Hits        44401    43396    -1005     
- Misses       7392     8725    +1333     
+ Partials     2041     2017      -24     
Flag Coverage Δ
keras 79.97% <0.00%> (-2.33%) ⬇️
keras-jax 64.07% <0.00%> (+0.27%) ⬆️
keras-numpy 59.09% <0.00%> (+0.33%) ⬆️
keras-openvino ?
keras-tensorflow 64.35% <0.00%> (+0.24%) ⬆️
keras-torch 64.11% <0.00%> (+0.28%) ⬆️

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.

@Raghavyadav17
Copy link
Author

@rkazants hi Roman hope you're doing well;
do I manually fix the code format ? or do i use any commands ?

@rkazants
Copy link
Contributor

rkazants commented Apr 3, 2025

Not correct implementation:

FAILED keras/src/ops/numpy_test.py::NumpyOneInputOpsCorrectnessTest::test_flip - AttributeError: module 'openvino.runtime.opset14' has no attribute 'Reverse'. Did you mean: 'inverse'?
= 1 failed, 2764 passed, 4073 skipped, 76 xfailed, 4 xpassed, 1 warning in 96.17s (0:01:36) =

@Raghavyadav17
Copy link
Author

Raghavyadav17 commented Apr 3, 2025

@rkazants i'll have it fixed by today!!!

Copy link

github-actions bot commented Sep 4, 2025

This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Sep 4, 2025
Copy link

This PR was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

@github-actions github-actions bot closed this Sep 19, 2025
@github-project-automation github-project-automation bot moved this from Assigned Reviewer to Closed/Rejected in PR Queue Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Closed/Rejected

Development

Successfully merging this pull request may close these issues.

[Good First Issue][Keras 3 OpenVINO Backend]: Support numpy.flip operation

7 participants