Upgrade transformers to 5.x (drops conftest mistral monkey-patch)
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- huggingface, python
- Domain
- machine-learning, testing-qa
Research direction
Start in pyproject.toml and tests/conftest.py: inspect the transformers dependency and _disable_transformers_mistral_regex_patch() helper, then review the linked upstream issue context. Upgrade transformers to >=5.0, remove the helper, and run the project tests to identify regressions from the major version change. Done means the workaround is gone, the dependency is upgraded, and tests pass.
Written by the indexing model from the issue text.
Description
Background
tests/conftest.py currently monkey-patches transformers.PreTrainedTokenizerBase._patch_mistral_regex to a no-op as a workaround for a confirmed transformers bug: on every tokenizer load with vocab_size > 100000 (e.g. our default intfloat/multilingual-e5-*), the method calls huggingface_hub.model_info() unconditionally. On CI that hammers the 1000-req/5-min HF rate limit and 429s.
Upstream issues / PRs documenting the bug:
- huggingface/transformers#44843
- huggingface/transformers#43200
- huggingface/transformers#45545
- huggingface/transformers#45444
- huggingface/transformers#43603
The #45444 merge commit message explicitly says:
faulty mistral tokenizers saved with version 4.57.{3,4,5,6} will load incorrectly... use 5.0.0 as 5.0.0rc0 introduced the fix... Exclusively check for mistral BEFORE v5
So:
- transformers 4.57.x has the bug — we're on 4.57.6, confirmed buggy
- transformers 5.0.0+ has the fix — latest is 5.10.2 (released yesterday)
- The fix was not backported to 4.x — it's "v5-only" by design
Task
Upgrade transformers to >=5.0 in pyproject.toml, then delete _disable_transformers_mistral_regex_patch() from tests/conftest.py.
Risk
transformers 5.0 is a major version bump (Mistral 4 support, removed deprecated APIs, etc). Likely surfaces breaking changes elsewhere in the codebase that would need addressing separately.
- Dominant language
- Python
- Stars
- 53
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deeppavlov/AutoIntent
-
`OptimizationConfig.seed` is `PositiveInt` — `seed=0` is rejected while `Pipeline(seed=0)` accepts itPossibly taken @Gambit-Checkmate claimed this 24 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
deeppavlov/AutoIntent#352 ·
-
Extract `BaseAPIDescriptionScorer` shared by `LLMDescriptionScorer` and `TypeSafeDescriptionScorer`Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
deeppavlov/AutoIntent#357 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
deeppavlov/AutoIntent#356 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
deeppavlov/AutoIntent#355 · 1 comment ·
-
`LLMDescriptionScorer` runs cache hits through the `max_per_second` limiter — 10 s per 100 cached utterancesPossibly taken @kayaal34 claimed this 24 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 58/100
deeppavlov/AutoIntent#354 ·
All issues in deeppavlov/AutoIntent
Similar issues
-
[Bug]: Streamed /v1/chat/completions sends unredacted agent error text (keys) in the final chunkPossibly taken @rodricksz4h5 claimed this today. Openarea/streaming comp/gateway P2 type/security
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#138245 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Update user onboarding guide for mandatory trigger CODEOWNERS stepPossibly taken @github-actions claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
correction metadata
Difficulty 2/5 Under an hour Newbie friendliness 68/100
acl-org/acl-anthology#10378 · 1 comment ·
Maintainers usually reply within 1 day
-
cloudtrail_multi_region_enabled_logging_management_events fails when the advanced event selector has a custom namePossibly taken @12YYCCYY16 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
prowler-cloud/prowler#13033 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
graygarbage/HermesKey#23 ·