Relax dependency bounds and make comet optional#448
Closed
smirnovlad wants to merge 3 commits intomainfrom
Closed
Conversation
- Remove spacy<3.8.0 upper bound (allows numpy 2.x via newer thinc) - Pin transformers<5 to avoid breaking API changes - Make unbabel-comet optional (lazy import in comet.py) - Add optional dependencies section to README
Collaborator
Author
|
unbabel-comet pins The Making comet optional here lets lm-polygraph install cleanly alongside vLLM without needing post-install sed hacks. |
Instead of commenting out comet entirely, move it to pyproject.toml optional-dependencies so users can install via `pip install lm-polygraph[comet]`. This avoids the numpy<2.0 conflict with vLLM while keeping comet easily installable for users who need it.
Collaborator
Author
|
Superseded by #446 which now includes both dependency changes and transformers 5.x compat code. |
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.
Summary
spacy<3.8.0upper bound: allows pip to resolve newerthinc/numpy>=2.0, which is required for compatibility withvLLMand other packages that neednumpy 2.xtransformers>=4.50.0,<5: transformers 5.x introduces breaking API changes (removedBeamScorer, renamed output classes, removedbatch_encode_plus). This pin keeps the current code working while we prepare a separate forward-compatibility PR.unbabel-cometoptional: commented out fromrequirements.txt, lazy-imported incomet.py, withtry/exceptin__init__.py. This removes the hard dependency that was pulling in conflictingtransformersversion constraints.unbabel-cometseparately.Motivation
This is a prerequisite for publishing ThinkBooster as a PyPI package —
lm-polygraphmust be installable without manual patching of dependency pins.What this PR does NOT include
Transformers 5.x forward-compatibility code changes (try/except import fallbacks,
batch_encode_plusreplacements, logits sanitizer). Those will come in a separate PR.Test plan
pip installin a clean environment resolves without conflictsunbabel-cometis installed separatelyunbabel-cometis not installed