Skip to content

Fix numpy version and remove scipy optional #347

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

Merged
merged 6 commits into from
Jun 5, 2025

Conversation

tylerhutcherson
Copy link
Collaborator

@tylerhutcherson tylerhutcherson commented Jun 3, 2025

Original goal of the task was to relax the forced numpy version constraint that was causing issues in Python 3.11 environments where numpy 2.x.x was required (like Google Colab)
Screenshot 2025-06-03 at 1 58 50 PM

Problem

However, I quickly ran into dependency chain issues with:

  • scipy -- the scientific computing stack is a bit like a dinosaur still
  • boto3 -- always an issue
  • ranx -- not really sure why, but this one has 13+ separate dependencies and includes a pin on numba that expects certain things from numpy and then it gets easily circular

Solution:

Working together with claude, I was able to resolve and rebuild the environment and the lockfile with one major change.

  • ranx is still an optional, but it's not an explicit extra.
  • What does that mean? Literally only means that if devs are using ranx they have to install it with pip install ranx instead of pip install redisvl[ranx]

This could be some kind of limitation with the poetry version I was using. But I spent 6 hours on this with Claude and probably spent 50$ in credits on working through an onion of python environment. It now works and our issues on google colab are gone. I also think the package ranges are a bit more generous now.

@tylerhutcherson tylerhutcherson requested a review from Copilot June 3, 2025 17:59
@tylerhutcherson tylerhutcherson added the bug Something isn't working label Jun 3, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR streamlines dependency declarations by consolidating the NumPy version constraint and removing SciPy as an optional dependency, while updating related extras.

  • Consolidated NumPy requirement to a single version specifier.
  • Removed conditional SciPy entries and cleaned up extras.
  • Corrected hyphenation for the google-cloud-aiplatform extra.

@tylerhutcherson tylerhutcherson requested a review from abrookins June 5, 2025 16:22
Copy link
Collaborator

@abrookins abrookins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@tylerhutcherson tylerhutcherson merged commit defa62a into main Jun 5, 2025
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants