Skip to content

Commit d2ac415

Browse files
committed
Upgrade numpy version requirement to
Summary: 1.21 is too old now. For 3.10 or above, we should be able to use 2.0.0 We are already on CoreMLTools 8.1, which is https://github.com/apple/coremltools/blob/8.1/reqs/build.pip We had to upgrade to the latest transformers as well
1 parent 44d223d commit d2ac415

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

.ci/docker/requirements-ci.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
mpmath==1.3.0
2-
numpy==1.21.3; python_version == '3.10'
3-
numpy==1.23.2; python_version == '3.11'
4-
numpy; python_version >= '3.12'
2+
numpy==2.0.0; python_version >= '3.10'
53
PyYAML==6.0.1
64
ruamel.yaml==0.17.32
75
sympy==1.12
86
timm==0.6.13
97
tomli==2.0.1
108
torchsr==1.0.4
11-
transformers==4.38.0
9+
transformers==4.47.1
1210
zstd==1.5.5.1
13-
pandas==2.0.3; python_version == '3.10'
14-
pandas; python_version >= '3.11'
11+
pandas==2.2.2; python_version >= '3.10'
1512
pytest==7.2.0
1613
pytest-cov==4.1.0
1714
expecttest==0.1.6

backends/apple/coreml/scripts/install_requirements.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ cmake --build "$COREMLTOOLS_DIR_PATH/build" --parallel
4747

4848
echo "${green}ExecuTorch: Installing coremltools."
4949
pip install "$COREMLTOOLS_DIR_PATH"
50-
# CoreMLTools have started supporting numpy 2.0,
51-
# but ExecuTorch example model test env is still using older transformers,
52-
# so for now we will need to downgrade numpy to 1.x
53-
# TODO: Remove this numpy downgrade once later transformers starts to be used
54-
pip install numpy==1.26.4
50+
5551
STATUS=$?
5652
if [ $STATUS -ne 0 ]; then
5753
echo "${red}ExecuTorch: Failed to install coremltools."

examples/models/llama/install_requirements.sh

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ pip install snakeviz sentencepiece
1313
# Install tiktoken for tokenizer
1414
pip install lm_eval==0.4.5
1515
pip install tiktoken blobfile
16-
# Restore numpy if >= 2.0
17-
pip install "numpy<2.0"
1816

1917
# Call the install helper for further setup
2018
python examples/models/llama/install_requirement_helper.py

install_requirements.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def python_is_compatible():
157157
"timm==1.0.7",
158158
f"torchaudio==2.6.0.{NIGHTLY_VERSION}" if USE_PYTORCH_NIGHTLY else "torchaudio",
159159
"torchsr==1.0.4",
160-
"transformers==4.46.1",
160+
"transformers==4.47.1",
161161
]
162162

163163
# pip packages needed for development.

pyproject.toml

+2-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,9 @@ dependencies=[
5555
"flatbuffers",
5656
"hypothesis",
5757
"mpmath==1.3.0",
58-
"numpy==1.21.3; python_version == '3.10'",
59-
"numpy==1.23.2; python_version == '3.11'",
60-
"numpy; python_version >= '3.12'",
58+
"numpy==2.0.0; python_version >= '3.10'",
6159
"packaging",
62-
"pandas==2.0.3; python_version == '3.10'",
63-
"pandas; python_version >= '3.11'",
60+
"pandas==2.2.2; python_version >= '3.10'",
6461
"parameterized",
6562
"pytest",
6663
"pytest-xdist",

0 commit comments

Comments
 (0)