Skip to content

Fix TPU test broken in master.#22605

Merged
hertschuh merged 1 commit intokeras-team:masterfrom
hertschuh:tpu_fix
Apr 1, 2026
Merged

Fix TPU test broken in master.#22605
hertschuh merged 1 commit intokeras-team:masterfrom
hertschuh:tpu_fix

Conversation

@hertschuh
Copy link
Copy Markdown
Collaborator

@hertschuh hertschuh commented Apr 1, 2026

One test is broken on TPU, the result of transforming an image has one pixel that's off.

Copy link
Copy Markdown
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 adds a fixed random seed to the channels_first test block in test_affine_transform. Feedback indicates that this is a brittle approach to fixing numerical failures as it masks underlying issues and reduces test coverage by resetting the RNG state to values already used earlier in the test. A more robust solution would be to adjust the tpu_atol tolerance for the specific assertion rather than forcing a specific random state.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.28%. Comparing base (28a83c5) to head (26d5cbc).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22605      +/-   ##
==========================================
- Coverage   83.28%   83.28%   -0.01%     
==========================================
  Files         596      596              
  Lines       68089    68102      +13     
  Branches    10607    10610       +3     
==========================================
+ Hits        56711    56720       +9     
- Misses       8634     8636       +2     
- Partials     2744     2746       +2     
Flag Coverage Δ
keras 83.09% <ø> (-0.01%) ⬇️
keras-jax 59.66% <ø> (-0.01%) ⬇️
keras-numpy 55.33% <ø> (-0.02%) ⬇️
keras-openvino 53.38% <ø> (+0.04%) ⬆️
keras-tensorflow 61.03% <ø> (-0.01%) ⬇️
keras-torch 59.84% <ø> (-0.01%) ⬇️

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.

One test is broken on TPU, the result of transforming an image has one pixel that's off.
@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Apr 1, 2026
@hertschuh hertschuh merged commit 838b7e3 into keras-team:master Apr 1, 2026
15 checks passed
@hertschuh hertschuh deleted the tpu_fix branch April 1, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:force-run ready to pull Ready to be merged into the codebase size:XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants