Skip to content
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

added changes to support numpy.log1p op #21050

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keras/src/backend/openvino/excluded_concrete_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ NumpyDtypeTest::test_isinf
NumpyDtypeTest::test_isnan
NumpyDtypeTest::test_linspace
NumpyDtypeTest::test_log10
NumpyDtypeTest::test_log1p

NumpyDtypeTest::test_log
NumpyDtypeTest::test_logspace
NumpyDtypeTest::test_matmul_
Expand Down
5 changes: 4 additions & 1 deletion keras/src/backend/openvino/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,10 @@ def log10(x):


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))



def log2(x):
Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
env =
KERAS_BACKEND=openvino
Comment on lines +1 to +3
Copy link
Contributor

Choose a reason for hiding this comment

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

need to remove this file

Copy link
Author

Choose a reason for hiding this comment

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

In the issue description it was mentioned that a pytest.ini file is to be created in the root of the cloned repo, should i still remove this file ?

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tf2onnx
# Torch.
--extra-index-url https://download.pytorch.org/whl/cpu
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.

need to revert this change


# Jax.
# Pinned to 0.5.0 on CPU. JAX 0.5.1 requires Tensorflow 2.19 for saved_model_test.
Expand Down