Fix broken PyPI wheel deps: add math-verify, cap transformers <5.13 (v0.3.21)#318
Merged
Conversation
…3.21) The published wheel is built from pyproject.toml [project.dependencies], which had drifted from requirements.txt. As a result `pip install optillm` shipped a broken package: - math-verify was missing entirely, so `import optillm` failed with ModuleNotFoundError (optillm.cepo imports math_verify at import time) -- the package would not even start. - transformers was unpinned, so the mlx-lm cap added in 0.3.19 (requirements.txt only) never reached PyPI; installs pulled transformers 5.13.0 and broke mlx-lm on Apple silicon. Sync the runtime deps into pyproject.toml: - add math-verify - transformers>=5.0.0,<5.13.0 - outlines[transformers]>=1.2.3 Verified by building the wheel and installing it into a clean venv (only its declared deps) and importing optillm successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
pip install optillm(from PyPI) shipped a broken package:import optillmfails withModuleNotFoundError: No module named 'math_verify', so the server won't even start.Root cause: the published wheel is built from
pyproject.toml[project.dependencies], which had drifted fromrequirements.txt:math-verifywas missing entirely —optillm/cepo/cepo.pyimportsmath_verifyat import time, so importing optillm crashes.transformerswas unpinned — the<5.13.0cap added in 0.3.19 only went intorequirements.txt, so PyPI installs pulled transformers 5.13.0 and broke mlx-lm on Apple silicon (the exact issue 0.3.19 was meant to fix).This was masked in CI because the dev install uses
requirements.txt(which had the deps), and the integration job's server-start step swallows startup errors with|| echo.Fix
Sync the runtime deps into
pyproject.toml:math-verifytransformers>=5.0.0,<5.13.0outlines[transformers]>=1.2.3Verification
Built the wheel and installed it into a clean venv (only its declared deps), then imported optillm — no
ModuleNotFoundError, and transformers resolves to 5.12.x. (Wheel metadata now listsRequires-Dist: math-verifyandtransformers<5.13.0,>=5.0.0.)