mirror of
https://github.com/huggingface/transformers.git
synced 2026-10-29 01:06:24 +08:00
* [imagegpt/vilt/trocr] fix cache fixture tests: use hf_hub_download instead of load_dataset On CI runners using the bucket cache, load_dataset returns a snapshot path for image files without materializing the binary blob, causing FileNotFoundError when tests try to open the cached images. Replace load_dataset with hf_hub_download (which explicitly downloads and guarantees the file exists) for: - imagegpt: fixtures_image_utils (4-test-cats.jpg, 5-test-selena.jpeg) - vilt: fixtures_nlvr2 (image1.jpeg, image2.jpeg) - TrOCR: fixtures_ocr (iam_picture.jpeg, SROIE-receipt.jpeg) Same fix as #49128 (gemma3n audio fixtures). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * ruff format fix for vilt test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>