transformers
fe33c61b - [imagegpt/vilt/trocr] fix cache fixture tests: use hf_hub_download instead of load_dataset

Commit
55 days ago
[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>
Author
Parents
Loading