Skip to content

Pre-fetch the hf-internal-testing/test-videos assets for CI - #51150

Draft
ydshieh wants to merge 1 commit into
mainfrom
prefetch-test-videos-for-ci
Draft

ydshieh wants to merge 1 commit into
mainfrom
prefetch-test-videos-for-ci

Conversation

@ydshieh

@ydshieh ydshieh commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

🤗 Transformers CI

What

This PR adds the hf-internal-testing/test-videos files used by tests to URLS_FOR_TESTING_DATA in utils/fetch_hub_objects_for_ci.py. That is 4 *_320x240.mp4 videos and 4 *_64x64.jpg images, about 370 KB in total.

Why

  • Since tests: reduce processor test memory usage and use tiny test assets #47168 the processor tests use these smaller assets (e.g. MODALITY_INPUT_DATA["videos"] in tests/test_processing_common.py). They were never added to the pre-fetch list.
  • So url_to_local_path finds no local copy and returns the URL, and every CI run downloads them at test time.
  • Example: on 2026-11-17 (push CI), MuseGlimmerProcessorTest::test_apply_chat_template_video_1 failed with httpx2.ReadTimeout after 5 reruns. Other video chat-template tests in the same job also needed reruns.

test-videos/karate.mp4 is not added. It is the same file as the already pre-fetched fixtures_videos/karate.mp4 (same sha256), so it is already served locally, and _check_basename_collisions would reject a second entry.

Verification (local)

  • _check_basename_collisions(URLS_FOR_TESTING_DATA) passes (119 URLs).
  • All 8 files download via download_test_file.
  • With them in the working directory, MODALITY_INPUT_DATA["videos"] resolves to the local files instead of the URLs.

The end-to-end effect needs the next CI docker image build, which runs this script.

🤖 Generated with Claude Code

The processor tests use `test-videos/*_320x240.mp4` and `*_64x64.jpg` (since #47168),
but they were never added to `URLS_FOR_TESTING_DATA`, so `url_to_local_path` returns
the URL and every run downloads them at test time (e.g. a `ReadTimeout` in
`MuseGlimmerProcessorTest::test_apply_chat_template_video_1` after 5 reruns).

`test-videos/karate.mp4` is not added: it is the same file as the already
pre-fetched `fixtures_videos/karate.mp4` (same sha256), and the basename check
would reject it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants