keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.06k stars 19.35k forks source link

Fix dtype test for `trace` #19686

Closed james77777778 closed 1 week ago

james77777778 commented 1 week ago

Additionally, fix the formatting error

codecov-commenter commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.01%. Comparing base (f12a205) to head (2da25b6). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #19686 +/- ## ========================================== - Coverage 78.41% 73.01% -5.41% ========================================== Files 498 498 Lines 45507 45544 +37 Branches 8379 8392 +13 ========================================== - Hits 35686 33253 -2433 - Misses 8091 10633 +2542 + Partials 1730 1658 -72 ``` | [Flag](https://app.codecov.io/gh/keras-team/keras/pull/19686/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | Coverage Δ | | |---|---|---| | [keras](https://app.codecov.io/gh/keras-team/keras/pull/19686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `72.93% <100.00%> (-5.34%)` | :arrow_down: | | [keras-jax](https://app.codecov.io/gh/keras-team/keras/pull/19686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `62.07% <100.00%> (+0.02%)` | :arrow_up: | | [keras-numpy](https://app.codecov.io/gh/keras-team/keras/pull/19686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `56.36% <0.00%> (-0.06%)` | :arrow_down: | | [keras-tensorflow](https://app.codecov.io/gh/keras-team/keras/pull/19686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=keras-team) | `63.44% <0.00%> (+0.02%)` | :arrow_up: | | [keras-torch](https://app.codecov.io/gh/keras-team/keras/pull/19686/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.

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

james77777778 commented 1 week ago

I have enforced the result dtype for ops.trace to be int32 if the input dtype is uint8 or uint16 regardless of the jax version we are using. It's impossible to get a common dtype because we run the tests with 0.4.23 for GPU and 0.4.27 for CPU.

We can fully resolve this once we have jax>=0.4.27 for GPU tests.