Skip to content

Conversation

@danielenricocahall
Copy link
Contributor

@danielenricocahall danielenricocahall commented Oct 24, 2025

  • Cleanup axis resolution (centralize to _resolve_axis function)
  • Support heaviside for functionality only (typing still needs work)
  • Remove test_isposinf from exclusion list as we now support that operation
  • Fix pad type tests
  • Fix variance and std implementations

Note: The type tests for var and std are currently omitted because the tests expect f32 and we're returning f64. - however, if we convert to f32, the results for the operation tests are slightly off e.g.,

E ACTUAL: array(0.666504, dtype=float32) 
E DESIRED: array(0.666667)

unsure if the tolerances in the correctness tests themselves need adjustment or if there's some type coercion happening under the hood when the values are being calculated. I tried different implementations for variance but they all arrive at the same result.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @danielenricocahall, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the OpenVINO backend by implementing new operations and refining existing ones. It focuses on improving code structure through axis resolution centralization, expanding functionality with heaviside support, and ensuring the correctness of statistical operations like variance and standard deviation.

Highlights

  • Axis Resolution Centralization: The logic for resolving axes in operations like count_nonzero and cumsum has been centralized into a new _resolve_axis function, reducing code duplication and improving consistency.
  • Heaviside Function Support: The heaviside operation is now implemented for the OpenVINO backend, moving from a NotImplementedError to functional support, though typing still requires further work.
  • Variance and Standard Deviation Fixes: The implementations for var and std have been refactored and corrected. std now leverages the var function, and var includes improved type handling for integral inputs and centralized axis resolution.
  • Test Exclusions Updated: Several tests related to pad, std, var, and heaviside have been removed from the excluded_concrete_tests.txt file, indicating that these operations are now expected to pass or are being re-evaluated.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several enhancements to the OpenVINO backend, including axis resolution cleanup, heaviside function support, test exclusion list updates, and variance/std implementation fixes. The changes aim to improve code maintainability and extend the functionality of supported operations.

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.68%. Comparing base (47fcb39) to head (d6e5f6f).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21774      +/-   ##
==========================================
- Coverage   82.69%   82.68%   -0.01%     
==========================================
  Files         573      577       +4     
  Lines       58888    59174     +286     
  Branches     9218     9271      +53     
==========================================
+ Hits        48696    48929     +233     
- Misses       7845     7873      +28     
- Partials     2347     2372      +25     
Flag Coverage Δ
keras 82.49% <100.00%> (-0.01%) ⬇️
keras-jax 63.31% <0.00%> (+0.07%) ⬆️
keras-numpy 57.54% <0.00%> (-0.18%) ⬇️
keras-openvino 34.38% <100.00%> (-0.02%) ⬇️
keras-tensorflow 64.08% <0.00%> (+0.06%) ⬆️
keras-torch 63.63% <0.00%> (+0.06%) ⬆️

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.

danielenricocahall and others added 2 commits October 24, 2025 13:52
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@danielenricocahall danielenricocahall marked this pull request as draft October 24, 2025 18:33
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.

3 participants