Skip to content

Conversation

sydney-runkle
Copy link
Collaborator

@sydney-runkle sydney-runkle commented Apr 7, 2025

Generally, this PR is CI performance focused + aims to clean up some dependencies at the same time.

  1. Unpins upper bounds for numpy in all pyproject.toml files where numpy is specified
  2. Requires numpy >= 2.1.0 for Python 3.13 and numpy > v1.26.0 for Python 3.12, plus a numpy min version bump for chroma
  3. Speeds up CI by minutes - linting on Python 3.13, installing numpy < 2.1.0 was taking ~3 minutes, now the entire env setup takes a few seconds
  4. Deleted the numpy test dependency from partners where that was not used, specifically huggingface, voyageai, xai, and nomic.

It's a bit unfortunate that langchain-community depends on numpy, we might want to try to fix that in the future...

Closes #26026
Fixes #30555

Copy link

vercel bot commented Apr 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Apr 8, 2025 1:06pm

@sydney-runkle sydney-runkle changed the title Support numpy >= 2.1.0 for Python 3.13 Require numpy >= 2.1.0 for Python 3.13 Apr 7, 2025
@sydney-runkle sydney-runkle marked this pull request as ready for review April 7, 2025 20:03
@dosubot dosubot bot added size:M labels Apr 7, 2025
Also, remove unnecessary numpy testing deps, ensuring
min version isn't bumped for chroma.
@sydney-runkle sydney-runkle changed the title Require numpy >= 2.1.0 for Python 3.13 Clean up numpy dependencies and speed up 3.13 CI with numpy >=2.1.0 Apr 7, 2025
@dosubot dosubot bot added the lgtm label Apr 7, 2025
@sydney-runkle sydney-runkle requested a review from baskaryan as a code owner April 7, 2025 22:45
@sydney-runkle sydney-runkle changed the title Clean up numpy dependencies and speed up 3.13 CI with numpy >=2.1.0 Clean up numpy dependencies and speed up 3.13 CI with numpy>=2.1.0 Apr 8, 2025
@sydney-runkle sydney-runkle merged commit 4556b81 into master Apr 8, 2025
228 checks passed
@sydney-runkle sydney-runkle deleted the unpin-numpy branch April 8, 2025 13:45
@Fuwad13
Copy link

Fuwad13 commented Apr 15, 2025

Hi @sydney-runkle,
I'm on python version 3.13 and I'm getting some Runtime warnings which eventually crashes my program

<frozen importlib._bootstrap>:488: Warning: Numpy built with MINGW-W64 on Windows 64 bits is experimental, and only available for 
testing. You are advised not to use it for production. 

CRASHES ARE TO BE EXPECTED - PLEASE REPORT THEM TO NUMPY DEVELOPERS

as this PR fixes this issue but this version is not yet available on pypi
how can i fix this or install the latest version ?
thanks in advance

@sydney-runkle
Copy link
Collaborator Author

Hi! We should be releasing shortly!

@sydney-runkle
Copy link
Collaborator Author

Should be fixed in langchain-chroma v0.2.3: https://pypi.org/project/langchain-chroma/

@Fuwad13
Copy link

Fuwad13 commented Apr 15, 2025

Hi sydney-runkle, the issue is fixed now. Thanks .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

langchain-chroma depends on numpy (>=1.26.2,<2.0.0) Python 3.13 needs Numpy > 2.0
4 participants