Pin kernels<0.13.0 in [cuda] extra to prevent huggingface-hub conflic… - #126
Open
gps23 wants to merge 1 commit into
Open
Pin kernels<0.13.0 in [cuda] extra to prevent huggingface-hub conflic…#126gps23 wants to merge 1 commit into
gps23 wants to merge 1 commit into
Conversation
…t with transformers (fixes Red-Hat-AI-Innovation-Team#91)
📝 WalkthroughWalkthroughThe CUDA optional dependency changes its ChangesCUDA dependency constraints
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Author
|
Hi @Maxusmusti, could you please take a look at this PR when you have a chance? It pins kernels to <0.13.0 in the CUDA extra to prevent the huggingface-hub incompatibility with transformers. All current checks are passing. Thank |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #91
Root cause:
kernels>=0.13.0bumped itshuggingface-hubrequirement to>=1.10.0, which conflicts withtransformers>=4.57.6,<5.0's requirement ofhuggingface-hub<1.0. Whenkernelsis installed/upgraded independently (e.g. in a separatepip installstep aftertransformersis already resolved), pip doesn't re-validatetransformers' constraint, so you end up with a newerhuggingface-hubinstalled alongside oldtransformers— which fails transformers' own version guard at import time.Verification: Bisected the exact breaking version using Docker:
kernels==0.12.3+transformers==4.57.6→ imports finekernels==0.13.0+transformers==4.57.6→ImportError: huggingface-hub>=0.34.0,<1.0 is required for a normal functioning of this module, but found huggingface-hub==1.24.0.Note: a single-command
pip install kernels transformers(no version drift) naturally resolves to a compatiblekernelsversion, since pip's resolver considers both constraints together. The bug only surfaces whenkernelsis installed/upgraded in a separate step fromtransformers, which is training_hub's own install pattern (pip install training-hub[lora]thenpip install training-hub[cuda]).Fix: Capped
kernels<0.13.0in the[cuda]extra.Summary by CodeRabbit
kernelsversions from 0.9.0 up to, but not including, 0.13.0.