fix: restrict transformers version to be less than 4.57.7#258
fix: restrict transformers version to be less than 4.57.7#258Azure99 wants to merge 1 commit intorunpod-workers:mainfrom
Conversation
|
@TimPietrusky could you please take a quick look? New serverless vLLM worker deployments are failing to start due to |
There was a problem hiding this comment.
Pull request overview
This PR constrains the transformers dependency to avoid installing incompatible versions alongside the image’s pinned vllm==0.11.0, preventing worker startup failures during tokenizer initialization.
Changes:
- Add an upper bound to the
transformersrequirement (<4.57.7) in the builder dependency list.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pydantic-settings | ||
| hf-transfer | ||
| transformers>=4.57.0 | ||
| transformers>=4.57.0,<4.57.7 |
There was a problem hiding this comment.
The PR description frames the problem as pip potentially installing transformers 5.x (incompatible with pinned vllm==0.11.0), but the change pins transformers to <4.57.7, which is much narrower than needed to avoid 5.x and will block newer 4.x patch/minor releases. If the intent is only to prevent 5.x, consider using an upper bound like <5 instead; if 4.57.7+ is specifically known to break with vLLM 0.11.0, please update the PR description (or add a short comment in requirements) to document why that exact cutoff is required.
| pydantic-settings | ||
| hf-transfer | ||
| transformers>=4.57.0 | ||
| transformers>=4.57.0,<4.57.7 |
There was a problem hiding this comment.
The dependency transformers>=4.57.0,<4.57.7 in a build/runtime requirements file allows pip to automatically pull new, unreviewed 4.57.x releases within this range, which is a classic software supply-chain attack vector. If an upstream transformers release in this range is compromised, its code will execute in the builder/worker environment with access to any available secrets and the ability to affect builds or runtime behavior. To reduce this risk, pin transformers to a specific, vetted version (and ideally include hashes or vendor it) so that upgrades only occur through explicit review.
|
Bump @TimPietruskyRunPod |
When building/running this worker,
transformersis currently not constrained (or effectively>=4.57.0without an upper bound), so pip may installtransformers5.x. The image pins vLLM to an older version (e.g.vllm==0.11.0onmain), and the combination is incompatible.At runtime, vLLM fails during tokenizer initialization with:
AttributeError: TokenizersBackend has no attribute all_special_tokens_extendedThis prevents the worker from starting at all.