Skip to content

Commit 734dae6

Browse files
mergennachindigantdesai
authored andcommitted
Upgrade numpy version requirement to 2.0 (#7599)
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 (cherry picked from commit a7b5297)
1 parent 8d37805 commit 734dae6

File tree

6 files changed

+9
-21
lines changed

6 files changed

+9
-21
lines changed

.ci/docker/requirements-ci.txt

+4-7
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
@@ -24,7 +21,7 @@ sphinx-gallery==0.14.0
2421
breathe==4.34.0
2522
exhale==0.2.3
2623
docutils==0.16
27-
matplotlib==3.7.2
24+
matplotlib==3.9.4
2825
# PyTorch Theme
2926
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
3027
myst-parser==0.18.1

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
@@ -16,8 +16,6 @@ pip install "$(dirname "$0")/../../../third-party/ao"
1616
# Install tiktoken for tokenizer
1717
pip install lm_eval==0.4.5
1818
pip install tiktoken blobfile
19-
# Restore numpy if >= 2.0
20-
pip install "numpy<2.0"
2119

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

install_requirements.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def python_is_compatible():
133133
"timm==1.0.7",
134134
"torchaudio==2.6.0" if USE_PYTORCH_NIGHTLY else "torchaudio",
135135
"torchsr==1.0.4",
136-
"transformers==4.46.1",
136+
"transformers==4.47.1",
137137
]
138138

139139
# 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",

third-party/pybind11

Submodule pybind11 updated 189 files

0 commit comments

Comments
 (0)