keras-team / keras-core

A multi-backend implementation of the Keras API, with support for TensorFlow, JAX, and PyTorch.
Apache License 2.0
1.27k stars 115 forks source link

[WIP] Increase-test-coverage for `keras_tensor` and `variables`+ Fix `__invert__` + Fix `FloorDivide` #944

Closed Faisal-Alsrheed closed 10 months ago

Faisal-Alsrheed commented 10 months ago

Increase-test-coverage for keras_tensor + Fix __invert__ method and update FloorDiv references in keras_tensor.py

  1. Fixes a TypeError encountered when using the unary bitwise inversion (~) on a KerasTensor object. The __invert__ method had an incorrect signature, accepting an unnecessary other parameter.
  2. Updates references from FloorDiv to FloorDivide to align with the correct operation name.

Changes:

  1. Modified the __invert__ method in keras_tensor.py to remove the other parameter and correctly call the LogicalNot operation:

  2. Updated all occurrences of FloorDiv to FloorDivide in keras_tensor.py to ensure correct behavior.

codecov[bot] commented 10 months ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -16.57% :warning:

Comparison is base (9bf92c8) 83.83% compared to head (e2ab5dc) 67.26%. Report is 6 commits behind head on main.

:exclamation: Current head e2ab5dc differs from pull request most recent head 6513f13. Consider uploading reports for the commit 6513f13 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #944 +/- ## =========================================== - Coverage 83.83% 67.26% -16.57% =========================================== Files 319 319 Lines 28879 28879 Branches 5529 5529 =========================================== - Hits 24211 19426 -4785 - Misses 3148 8117 +4969 + Partials 1520 1336 -184 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras_core](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `67.26% <100.00%> (-16.47%)` | :arrow_down: | | [keras_core-jax](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `?` | | | [keras_core-numpy](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `?` | | | [keras_core-tensorflow](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `67.26% <100.00%> (+0.18%)` | :arrow_up: | | [keras_core-torch](https://app.codecov.io/gh/keras-team/keras-core/pull/944/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/keras-team/keras-core/pull/944?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras\_core/backend/common/keras\_tensor.py](https://app.codecov.io/gh/keras-team/keras-core/pull/944?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team#diff-a2VyYXNfY29yZS9iYWNrZW5kL2NvbW1vbi9rZXJhc190ZW5zb3IucHk=) | `99.29% <100.00%> (+29.07%)` | :arrow_up: | ... and [89 files with indirect coverage changes](https://app.codecov.io/gh/keras-team/keras-core/pull/944/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fchollet commented 10 months ago

Keras Core is becoming Keras 3, and we're switching development to the main repository! Please reopen this PR in the keras-team/keras repository. Unfortunately we aren't able to automatically transfer PRs (but we have transferred all issues).