Skip to content

Commit 3bfb506

Browse files
committed
chore: bump NumPy to v2.0.2
Commit 66c24fa pinned NumPy to v1.x due to an upstream incompatibility in sentence-transformers. In September 2024 [1], Aider picked up sentence-transformers v3.1.1, which contains a fix for the NumPy 2 incompatibility [2]. To help unblock PR Aider-AI#3037 [3], bump NumPy to v2.0.2, the most recent version still compatible to Python 3.9. [1]: Aider-AI@2ca093f [2]: UKPLab/sentence-transformers#2937 [3]: Aider-AI#3037
1 parent af8558b commit 3bfb506

6 files changed

+21
-15
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ networkx==3.2.1
193193
# via
194194
# -c requirements/common-constraints.txt
195195
# -r requirements/requirements.in
196-
numpy==1.26.4
196+
numpy==2.0.2
197197
# via
198198
# -c requirements/common-constraints.txt
199199
# scipy

requirements/common-constraints.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ nltk==3.9.1
223223
# via llama-index-core
224224
nodeenv==1.9.1
225225
# via pre-commit
226-
numpy==1.26.4
226+
numpy==2.0.2
227227
# via
228228
# -r requirements/requirements-help.in
229229
# contourpy
@@ -395,7 +395,9 @@ semver==3.0.4
395395
sentence-transformers==3.4.1
396396
# via llama-index-embeddings-huggingface
397397
setuptools==75.8.2
398-
# via pip-tools
398+
# via
399+
# pip-tools
400+
# torch
399401
shellingham==1.5.4
400402
# via typer
401403
six==1.17.0
@@ -421,7 +423,7 @@ sqlalchemy[asyncio]==2.0.38
421423
# via llama-index-core
422424
streamlit==1.43.1
423425
# via -r requirements/requirements-browser.in
424-
sympy==1.13.3
426+
sympy==1.13.1
425427
# via torch
426428
tenacity==9.0.0
427429
# via
@@ -439,7 +441,7 @@ tokenizers==0.21.0
439441
# transformers
440442
toml==0.10.2
441443
# via streamlit
442-
torch==2.2.2
444+
torch==2.6.0
443445
# via
444446
# -r requirements/requirements-help.in
445447
# sentence-transformers

requirements/requirements-browser.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ narwhals==1.29.1
6262
# via
6363
# -c requirements/common-constraints.txt
6464
# altair
65-
numpy==1.26.4
65+
numpy==2.0.2
6666
# via
6767
# -c requirements/common-constraints.txt
6868
# pandas

requirements/requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ nodeenv==1.9.1
8686
# via
8787
# -c requirements/common-constraints.txt
8888
# pre-commit
89-
numpy==1.26.4
89+
numpy==2.0.2
9090
# via
9191
# -c requirements/common-constraints.txt
9292
# contourpy

requirements/requirements-help.in

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
llama-index-core
22
llama-index-embeddings-huggingface
33

4-
# Because sentence-transformers doesn't like >=2
5-
numpy<2
4+
# Pin below 2.1.0 to retain Python 3.9 compatibility
5+
numpy>=2,<2.1.0
66

7-
# Mac x86 only supports 2.2.2
8-
# https://discuss.pytorch.org/t/why-no-macosx-x86-64-build-after-torch-2-2-2-cp39-none-macosx-10-9-x86-64-whl/204546/2
9-
torch==2.2.2
7+
# Mac x86 only supports torch 2.2.2, but NumPy 2 requires torch 2.3 or newer
8+
# https://discuss.pytorch.org/t/why-no-macosx-x86-64-build-after-torch-2-2-2-cp39-no
9+
torch>=2.3.0

requirements/requirements-help.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ nltk==3.9.1
154154
# via
155155
# -c requirements/common-constraints.txt
156156
# llama-index-core
157-
numpy==1.26.4
157+
numpy==2.0.2
158158
# via
159159
# -c requirements/common-constraints.txt
160160
# -r requirements/requirements-help.in
@@ -222,6 +222,10 @@ sentence-transformers==3.4.1
222222
# via
223223
# -c requirements/common-constraints.txt
224224
# llama-index-embeddings-huggingface
225+
setuptools==75.8.2
226+
# via
227+
# -c requirements/common-constraints.txt
228+
# torch
225229
sniffio==1.3.1
226230
# via
227231
# -c requirements/common-constraints.txt
@@ -230,7 +234,7 @@ sqlalchemy[asyncio]==2.0.38
230234
# via
231235
# -c requirements/common-constraints.txt
232236
# llama-index-core
233-
sympy==1.13.3
237+
sympy==1.13.1
234238
# via
235239
# -c requirements/common-constraints.txt
236240
# torch
@@ -250,7 +254,7 @@ tokenizers==0.21.0
250254
# via
251255
# -c requirements/common-constraints.txt
252256
# transformers
253-
torch==2.2.2
257+
torch==2.6.0
254258
# via
255259
# -c requirements/common-constraints.txt
256260
# -r requirements/requirements-help.in

0 commit comments

Comments
 (0)