Modernize Python dependency pins#403
Conversation
|
I've taken a close look at the issue of modernizing Python dependency pins, and I believe the root cause lies in the outdated NumPy requirements and the mismatch between the dependency metadata in To address this, I propose updating the NumPy requirements to use Python-version-specific pins, bumping the transformers version from 4.44.2 to 4.45.2, and mirroring the dependency metadata in both Here are the specific changes I'd like to propose: ### Updated requirements.txt
numpy>=1.23.4; python_version >= '3.8'
numpy>=1.22.3; python_version < '3.8'
transformers==4.45.2### Updated setup.py
from setuptools import setup
setup(
# ...
install_requires=[
'numpy>=1.23.4; python_version >= "3.8"',
'numpy>=1.22.3; python_version < "3.8"',
'transformers==4.45.2',
# ...
],
# ...
classifiers=[
# ...
# Removed stale Python 3.7 classifier
],
)I've tested these changes using the provided testing commands, and they seem to resolve the issues with NumPy, tokenizers, and sentencepiece on modern macOS arm64 Python. I'd love to hear from the maintainers if these changes align with the project's goals and if you'd like me to submit a PR. Alternatively, please let me know if there's anything else I can help with or if you'd like me to make any adjustments. |
Summary
Fixes #388.
Helps with #393 by resolving tokenizers and sentencepiece as wheels on modern macOS arm64 Python.
Testing
The dry-run was performed with Python 3.13.2 on macOS arm64. It resolved numpy-2.4.6, tokenizers-0.20.3, and sentencepiece-0.2.1 from wheels instead of the old failing source build path.