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

Refactor merging layers tests as parametrized tests. #913

Closed hertschuh closed 10 months ago

hertschuh commented 10 months ago

They are almost identical for every merging layer.

This simplifies adding tests that apply to every layer. This is in preparation for adding sparse tensors support.

codecov[bot] commented 10 months ago

Codecov Report

Patch coverage has no change and project coverage change: +0.01% :tada:

Comparison is base (f38e2e6) 83.62% compared to head (b6143c4) 83.63%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #913 +/- ## ========================================== + Coverage 83.62% 83.63% +0.01% ========================================== Files 318 318 Lines 28391 28391 Branches 5409 5409 ========================================== + Hits 23741 23745 +4 + Misses 3150 3147 -3 + Partials 1500 1499 -1 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras-core/pull/913/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/913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `83.52% <ø> (+0.01%)` | :arrow_up: | | [keras_core-jax](https://app.codecov.io/gh/keras-team/keras-core/pull/913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `67.59% <ø> (+0.01%)` | :arrow_up: | | [keras_core-numpy](https://app.codecov.io/gh/keras-team/keras-core/pull/913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `60.73% <ø> (ø)` | | | [keras_core-tensorflow](https://app.codecov.io/gh/keras-team/keras-core/pull/913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `67.08% <ø> (+0.01%)` | :arrow_up: | | [keras_core-torch](https://app.codecov.io/gh/keras-team/keras-core/pull/913/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `69.44% <ø> (+0.01%)` | :arrow_up: | 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. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/keras-team/keras-core/pull/913/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.