-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Context
🚀 A great opportunity to contribute to two popular AI projects with just one PR: Keras 3 and OpenVINO.
Keras 3 enables seamless switching between supported backends—PyTorch, TensorFlow, and JAX. Since Keras 3.8.0, the OpenVINO backend allows developers to leverage OpenVINO for model predictions directly within Keras 3 workflows. Currently, the OpenVINO backend lacks support for some operations. Our goal is to resolve this gap and to optimize it for inference on Intel devices by supporting as many models as possible while delivering optimal performance.
What needs to be done?
Implement vectorize and resolve existing issues with the power operation in the OpenVINO backend.
The vectorize operation is required to map custom functions over arrays, while the power implementation currently exists but fails Keras suite tests, likely due to broadcasting logic or dtype handling.
These should be implemented/fixed in keras/src/backend/openvino/numpy.py and must align with NumPy-equivalent behavior.
Steps to Contribute
First use .take to get the issue assigned to you.
Since this involves cross-repo work between Keras and OpenVINO, please follow these steps carefully:
-
Set up your developer environment:
- Fork and clone the Keras repository.
- Install the requirements:
pip install -r requirements.txt.
-
Implement the operation:
- Provide the decomposition in Python for the targeted operation in
keras/src/backend/openvino/numpy.py. - Use the OpenVINO Operation Set for the implementation.
- Provide the decomposition in Python for the targeted operation in
-
Enable and verify tests:
- Remove the line corresponding to the implemented operation from the
excluded_concrete_tests.txtfile (located in the OpenVINO backend directory). - Create a
pytest.inifile in the root directory of your cloned repository with the following content to set the backend:[pytest] env = KERAS_BACKEND=openvino
- Run the tests to ensure everything is passing:
pytest -c ./pytest.ini ./keras/src/ops/numpy_test.py
- Remove the line corresponding to the implemented operation from the
-
Submit your PR:
- Commit your changes and create a Pull Request in the Keras repository.
- Mention @rkazants in the PR description for review.
Example Pull Requests
Resources
- Contribution guide - start here!
- Intel DevHub Discord channel - engage in discussions, ask questions and talk to OpenVINO developers
- How to link your Pull Request to an issue
Contact points
AI notice - Important!
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Ticket
Metadata
Metadata
Assignees
Labels
Type
Projects
Status