Skip to content

Comments

[CI] [GHA] Use snapshot_download for HF models#3348

Open
akashchi wants to merge 5 commits intoopenvinotoolkit:masterfrom
akashchi:ci/gha/use-snapshot-download
Open

[CI] [GHA] Use snapshot_download for HF models#3348
akashchi wants to merge 5 commits intoopenvinotoolkit:masterfrom
akashchi:ci/gha/use-snapshot-download

Conversation

@akashchi
Copy link
Contributor

@akashchi akashchi commented Feb 17, 2026

Should lower the number of API requests to the HF servers.

It was introduced and tested in openvinotoolkit/openvino/pull/32282 and openvinotoolkit/openvino/pull/32458

Ticket:

  • 180694

@akashchi akashchi requested a review from sgonorov as a code owner February 17, 2026 08:55
Copilot AI review requested due to automatic review settings February 17, 2026 08:55
@akashchi akashchi added the WIP label Feb 17, 2026
@github-actions github-actions bot added category: visual language Visual language pipeline category: whisper Whisper pipeline category: tokenizers Tokenizer class or submodule update category: GGUF GGUF file reader category: text streamer labels Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the test suite to use snapshot_download from huggingface_hub instead of directly calling model loading functions with model IDs. This change helps reduce the number of API requests to HuggingFace servers by downloading all model files at once and caching them locally before loading models and tokenizers.

Changes:

  • Replaced direct model ID usage with snapshot_download() calls to pre-cache models and reduce HF API rate limit issues
  • Added huggingface_hub.snapshot_download imports across multiple test files
  • Applied the pattern consistently across test files for Whisper, VLM, tokenizer, and parser tests

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/python_tests/utils/hugging_face.py Updated get_huggingface_models() and GGUF loading functions to use snapshot_download for caching models before loading
tests/python_tests/test_whisper_pipeline_static.py Added snapshot_download call in load_and_save_whisper_model() to cache model before loading processor and tokenizer
tests/python_tests/test_whisper_pipeline.py Added snapshot_download call in save_to_temp() to cache model before loading tokenizer, model, and processor
tests/python_tests/test_vlm_pipeline.py Added snapshot_download calls in multiple functions to cache VLM models before loading processors and tokenizers
tests/python_tests/test_vllm_parsers_wrapper.py Added inline snapshot_download calls when creating parsers with tokenizers
tests/python_tests/test_tokenizer.py Added snapshot_download calls in multiple test functions to cache models before loading tokenizers
tests/python_tests/test_text_streamer.py Added inline snapshot_download calls when loading tokenizers for text streaming tests
tests/python_tests/test_parsers.py Added snapshot_download call in fixture to cache model before loading tokenizer

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 14 comments.

Copilot AI review requested due to automatic review settings February 19, 2026 10:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

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

Labels

category: GGUF GGUF file reader category: text streamer category: tokenizers Tokenizer class or submodule update category: visual language Visual language pipeline category: whisper Whisper pipeline WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant