Skip to content

Fix broken PyPI wheel deps: add math-verify, cap transformers <5.13 (v0.3.21)#318

Merged
codelion merged 1 commit into
mainfrom
fix/pyproject-deps
Jul 5, 2026
Merged

Fix broken PyPI wheel deps: add math-verify, cap transformers <5.13 (v0.3.21)#318
codelion merged 1 commit into
mainfrom
fix/pyproject-deps

Conversation

@codelion

@codelion codelion commented Jul 5, 2026

Copy link
Copy Markdown
Member

Problem

pip install optillm (from PyPI) shipped a broken package: import optillm fails with ModuleNotFoundError: 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 from requirements.txt:

  • math-verify was missing entirelyoptillm/cepo/cepo.py imports math_verify at import time, so importing optillm crashes.
  • transformers was unpinned — the <5.13.0 cap added in 0.3.19 only went into requirements.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:

  • add math-verify
  • transformers>=5.0.0,<5.13.0
  • outlines[transformers]>=1.2.3

Verification

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 lists Requires-Dist: math-verify and transformers<5.13.0,>=5.0.0.)

…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>
@codelion codelion merged commit e5ab29e into main Jul 5, 2026
6 checks passed
@codelion codelion deleted the fix/pyproject-deps branch July 5, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant