Skip to content

FIX Mock tokenizer in unit test to avoid HuggingFace network call#1402

Merged
romanlutz merged 1 commit intoAzure:mainfrom
romanlutz:romanlutz/fix_tokenizer_test
Feb 25, 2026
Merged

FIX Mock tokenizer in unit test to avoid HuggingFace network call#1402
romanlutz merged 1 commit intoAzure:mainfrom
romanlutz:romanlutz/fix_tokenizer_test

Conversation

@romanlutz
Copy link
Contributor

The chatml_tokenizer_normalizer fixture was calling AutoTokenizer.from_pretrained() which requires network access to HuggingFace. Replaced with a mock that simulates ChatML template formatting, making the test fully offline.

This stems from #1296 and fails intermittently. Alternatively, we could make this an integration test where we don't mind network access.

The chatml_tokenizer_normalizer fixture was calling
AutoTokenizer.from_pretrained() which requires network access to
HuggingFace. Replaced with a mock that simulates ChatML template
formatting, making the test fully offline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz romanlutz merged commit e89ccfe into Azure:main Feb 25, 2026
29 checks passed
@romanlutz romanlutz deleted the romanlutz/fix_tokenizer_test branch February 25, 2026 18:22
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