fix: bump us to numpy 2.X to fix user err on discord #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
a user on discord mentioned having an issue with numpy here: https://discord.com/channels/778680217417809931/1349393513351217242/1400377086627287050
Logs from user:
https://gist.github.com/pklewing/d1251f274990a22f793e922709f34ad4
The user encountered the error because they had NumPy 2.2.6 installed, but PyTorch and sentence-transformers were compiled with NumPy 1.x, creating a compatibility mismatch where NumPy 2.x modules couldn't run with packages built for NumPy 1.x.
Specifying torch>=2.7.0 in our vectorstore dependencies fixes this because PyTorch 2.7+ was specifically updated to support both NumPy 1.x and 2.x, so it can handle either version without compatibility issues, whereas the previous approach of letting sentence-transformers pull in an older PyTorch version would still cause the NumPy 2.x compatibility error.