-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump NumPy to v2.0.2 for Python 3.13 compatibility #3444
base: main
Are you sure you want to change the base?
Conversation
I'm trying to figure out whether these failures could be related to the recent downgrade to torch v2.2.2, which occurred in f266a9d. @paul-gauthier Was the torch downgrade deliberate? Would you mind if I bumped it again? |
There wasn't a "recent" downgrade to torch==2.2.2. Aider has been using that version since at least November (95b3913). Torch got bumped up by you during your last PR. I didn't do anything intentionally to put it back to 2.2.2. I ran |
Alright, thanks for clarifying! Just trying to be extra cautious to make sure I don't tear down Chesterton's fence or stomp on anything important. |
Ok, so the goal for this PR is to have torch==2.6.0 and numpy==2.0.2.
|
I just pushed a change that will conflict with your work, sorry. I switched pip-compile.sh to use uv, which makes it much faster. Doesn't change anything else. This may make it easier for you to iterate. |
It also runs with some verbosity, which may let you see why things are being pinned. |
torch 2.2.2 seems to be the latest version available for x86 Macs. So it seems wise to pin torch there, otherwise x86 Mac users can't use aider. Or we have to go down a complex platform dependent versioning path. |
That’s good news! I’ve been meaning to get into uv, so that’s an excellent opportunity. I’ve heard only good things so far about uv.
Thanks for the heads up, good to know! This is going to be really difficult. As far as I know, torch v2.2.2 is hard-wired to NumPy 1.x, which means no Python 3.13. I’m going to have to think about this for a while. |
On the other hand: if we go ahead with torch v2.6.0, the only thing that x86 Mac users would be losing is the |
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
They absolutely can use aider.
I could give this a try if you prefer, similar to your |
Commit 25da067 introduced a manually curated fragment for `tree-sitter` to work around shortcomings [1] of pip-compile. Generalize this technique by introducing a declarative blocklist and associated script. This feature is going to be needed by three unrelated features: fixing `pydub`, running `pip-compile.sh` on non-Apple platforms, and exploring the "complex platform dependent versioning path" proposed in PR Aider-AI#3444 [2]. As an added benefit, the blocklist script: - allows comments in the blocklist; and - removes extraneous comments from `requirements.txt`, avoiding misattribution and confusion if a human looks at them. [1]: jazzband/pip-tools#639 (comment) [2]: Aider-AI#3444 (comment)
@paul-gauthier Let me know if you feel that losing Alternatively, if you’d prefer me to explore the "complex platform dependent versioning path", then #3469 needs to be merged first. |
Commit 25da067 introduced a manually curated fragment for `tree-sitter` to work around shortcomings [1] of pip-compile. Generalize this technique by introducing a declarative blocklist and associated script. This feature is going to be needed by three unrelated features: fixing `pydub`, running `pip-compile.sh` on non-Apple platforms, and exploring the "complex platform dependent versioning path" proposed in PR Aider-AI#3444 [2]. As an added benefit, the blocklist script: - allows comments in the blocklist; and - removes extraneous comments from `requirements.txt`, avoiding misattribution and confusion if a human looks at them. [1]: jazzband/pip-tools#639 (comment) [2]: Aider-AI#3444 (comment)
Commit 25da067 introduced a manually curated fragment for `tree-sitter` to work around shortcomings [1] of pip-compile. Generalize this technique by introducing a declarative blocklist and associated script. This feature is going to be needed by three unrelated features: fixing `pydub`, running `pip-compile.sh` on non-Apple platforms, and exploring the "complex platform dependent versioning path" proposed in PR Aider-AI#3444 [2]. As an added benefit, the blocklist script: - allows comments in the blocklist; and - removes extraneous comments from `requirements.txt`, avoiding misattribution and confusion if a human looks at them. [1]: jazzband/pip-tools#639 (comment) [2]: Aider-AI#3444 (comment)
Commit 25da067 introduced a manually curated fragment for `tree-sitter` to work around shortcomings [1] of pip-compile. Generalize this technique by introducing a declarative blocklist and associated script. This feature is going to be needed by three unrelated features: fixing `pydub`, running `pip-compile.sh` on non-Apple platforms, and exploring the "complex platform dependent versioning path" proposed in PR Aider-AI#3444 [2]. As an added benefit, the blocklist script: - allows comments in the blocklist; and - removes extraneous comments from `requirements.txt`, avoiding misattribution and confusion if a human looks at them. [1]: jazzband/pip-tools#639 (comment) [2]: Aider-AI#3444 (comment)
Commit 66c24fa pinned NumPy to v1.x due to an upstream incompatibility in sentence-transformers.
In September 2024, Aider picked up sentence-transformers v3.1.1, which contains a fix for the NumPy 2 incompatibility. So it’s now safe to use NumPy 2.
To help unblock Python 3.13 compatibility (#3037), bump NumPy to v2.0.2, the most recent version still compatible to Python 3.9.