Repository navigation
fix(cosmos3_edge): bump backend_equivalence_atol for Pillow 13.x (miss from #50105) - #50327
Merged
Merged
Conversation
…bic change (#50105 miss) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ydshieh
force-pushed
the
fix-cosmos3edge-backend-equivalence-atol
branch
from
November 3, 2026 19:49
14744c8 to
69d424c
Compare
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: cosmos3_edge |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ydshieh
added a commit
that referenced
this pull request
Nov 9, 2026
…) (#50510) * Fix flaky backend equivalence tests with Pillow 13 (follow-up of #50105) Pillow >= 13 can reverse the order of the two bicubic resize passes, which gives isolated pixel differences vs torchvision above the default `atol=0.1`. #50105 (and #50170, #50327) set `backend_equivalence_atol = 0.5` for the affected models; bridgetower, poolformer, deepseek_ocr2, got_ocr2, hunyuan_vl and levit were missed. bridgetower, deepseek_ocr2 and got_ocr2 override the backend equivalence tests and call `_assert_tensors_equivalence` without `atol`, which ignored `backend_equivalence_atol`. Make the helper default to the class attribute (same value as before when it's not set), so those tests (and e.g. flava's `test_slow_fast_equivalence`) also use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pass `backend_equivalence_atol` explicitly instead of changing the helper default Keep `_assert_tensors_equivalence` unchanged and pass `atol=self.backend_equivalence_atol` to the pixel value comparisons of the overridden backend equivalence tests (bridgetower, deepseek_ocr2, got_ocr2, and flava, which already sets `backend_equivalence_atol = 0.5`). Masks are still compared with the default tolerance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
cosmos3_edgewas missing thebackend_equivalence_atol = 0.5override added in #50105 for Pillow 13.x compatibility.Pillow 13.x changed the order of bicubic resize passes (see python-pillow/Pillow#9549), producing slightly different pixels vs torchvision. The test was failing ~50% of the time with PIL 13.0.
Verified locally: