Skip to content

Fix test_decode_webp_grayscale for newer torch nightlies. - #9663

Merged
NicolasHug merged 1 commit into
mainfrom
adabeyta/fix-webp-grayscale-warning-test
Sep 14, 2026
Merged

NicolasHug merged 1 commit into
mainfrom
adabeyta/fix-webp-grayscale-warning-test

Conversation

@adabeyta

@adabeyta adabeyta commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Torch nightly raises C++ warnings from torch.ops as Python warnings instead of printing to stderr (pytorch/pytorch#193451), so the capfd check in this test now sees an empty string and fails on main.

  • Switched to pytest.warns, like the other warning tests in test_image.py.
  • Drop the set_always_warn helper.

…ises torch.ops C++ warnings as Python warnings.
@pytorch-bot

pytorch-bot Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9663

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Unclassified Failure

As of commit ed04bee with merge base ac8d215 (image):

UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the cla signed label Sep 9, 2026
@adabeyta
adabeyta marked this pull request as ready for review September 9, 2026 20:00
@adabeyta adabeyta changed the title [Test] Fix test_decode_webp_grayscale for newer torch nightlies. Fix test_decode_webp_grayscale for newer torch nightlies. Sep 9, 2026
@adabeyta
adabeyta requested a review from NicolasHug September 9, 2026 20:00
@adabeyta
adabeyta added this pull request to stack #9664 September 9, 2026 20:02

@NicolasHug NicolasHug left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adabeyta !

@NicolasHug
NicolasHug merged commit b7c283a into main Sep 14, 2026
57 checks passed
cyyever pushed a commit to BakeLab/vision that referenced this pull request Sep 26, 2026
hmaarrfk added a commit to regro-cf-autotick-bot/torchvision-feedstock that referenced this pull request Oct 30, 2026
<details><summary>Claude's draft</summary>

All 24 tested jobs (linux-64, osx-64, win-64) fail only
test_decode_webp_grayscale[decode_webp] and [decode_image], with
"DID NOT WARN" while the warning is printed to stderr.

v0.29.2 cherry-picked pytorch/vision#9663, which moved the test from
capfd to pytest.warns. That relies on pytorch/pytorch#193451, which
routes C++ warnings from torch.ops through Python. It landed on
2026-08-28 and is not in v2.14.0 or v2.14.1, so the torch 2.14 this
feedstock builds against still sends the warning to stderr. The decoder
itself behaves correctly, and only the test's expectation is ahead of
the torch release, so skip it and drop the skip with torch 2.15.

Resume this Claude session:
```
cd /home/mark/git/feedstock
claude --resume 6cccca21-7312-446b-935c-b70848f0f002
```
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants