Skip to content
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

Allow Numpy >=2.0 #1264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mgraczyk
Copy link

@mgraczyk mgraczyk commented Sep 29, 2024

Checklist

  • Run tests locally to make sure nothing is broken using make test.
$ make test
...
=================================================================================== 944 passed, 236 skipped, 287 warnings in 146.92s (0:02:26) ====================================================================================
  • Run the formatter to format the code using make lint.
~/dev/mteb> make lint
--- 🧹 Running linters ---
ruff format .                   # running ruff formatting
695 files left unchanged
ruff check . --fix      # running ruff linting
All checks passed!

Fixes #1263

@mgraczyk mgraczyk changed the title Allow Numpy >=2.0 Allow Numpy >=2.0 (#1263) Sep 29, 2024
@mgraczyk mgraczyk changed the title Allow Numpy >=2.0 (#1263) Allow Numpy >=2.0 Sep 29, 2024
@mgraczyk
Copy link
Author

I'm currently running the tests in a docker container python:3.10-bullseye to see what is going wrong with the AUC test

@mgraczyk
Copy link
Author

I don't have an x86 machine handy right now, and running with mac ARM emulation is very slow (running for > 30 minutes)
I can run later, otherwise somebody else could run this on an x86 machine

@mgraczyk
Copy link
Author

The issue is that np.argsort' is stable by default in numpy 2.0 I switched to stable=True` so that results match between numpy 1.0 and 2.0, and between different platforms

@mgraczyk
Copy link
Author

@isaac-chung The tests should be good to rerun now

@isaac-chung
Copy link
Collaborator

Hmm looks like for python 3.9 and 3.10 numpy 2.0.0+ was installed in the tests. For Python 3.8, numpy 1.24 was installed, and "stable" doesn't seem to be a valid keyword for argsort (test).

@mgraczyk
Copy link
Author

mgraczyk commented Oct 2, 2024

Looks like numpy 2.0 dropped support for Python 3.8
I can add a wrapper that uses one or the other conditionally

@KennethEnevoldsen
Copy link
Contributor

Looks like numpy 2.0 dropped support for Python 3.8
I can add a wrapper that uses one or the other conditionally

I think I am more for dropping support for 3.8 it is getting close to end-of-life anyway (end of this month).

(@Muennighoff looping you in here as well)

@mgraczyk
Copy link
Author

mgraczyk commented Oct 3, 2024

Ok, this isn't urgent so I'll probably just wait until Python 3.8 is dropped, then try to merge this as-is without a workaround

@Muennighoff
Copy link
Contributor

Dropping Py3.8 now or later; either works w/ me

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.

Allow Numpy 2.0
4 participants