-
Notifications
You must be signed in to change notification settings - Fork 354
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 to run #4829
allow numpy 2.0 to run #4829
Conversation
List of packages upstream that need to be rebuilt against numpy 2.0 before we can enable support.
|
The latest versions of LALSuite support Numpy 1.x and 2.x. Would you please retry this? |
It's failing to install pypmc from source, but it's trying to build an old version when there are newer ones with wheels available. |
Rerunning after rebasing from #4863, If this works, then this can be merged afterwards. |
@spxiwh Ok, I think this may now be working. There are a couple fixes that were needed. I'll draw attention to the following issue that appeared We had a few places where we did something like a = numpy.array(b, copy=False). In some cases the type of b might be a list or something that actually has to be copied. In older numpy versions it would silently copy it and continue on. In numpy 2.0 this is properly enforced so a few errors were popping up in the tests. |
@spxiwh I don't see anything obvious in the templatebank workflow logs. Do you have any insight? I've tried to reproduce offline, but it works locally for me. I haven't worked through all he variables yet though, so maybe there is a more subtle problem. |
@ahnitz I see two failures, the search workflow and the template bank workflow. The search workflow is failing with:
but only for one of the pycbc_coinc_findtrigs jobs. I wonder if this is a "no triggers = wrong dtpye" type error, but why is it getting no triggers, if so? The template bank workflow failed with:
I'm guessing this is an issue in the sbank wheel (is it expected that we need all dependencies compiled against numpy >=2?). Do I need to make a new release of sbank with wheels built against numpy >= 2? |
Yes. If you build against Numpy >= 2, then the wheel will be compatible with Numpy 1.x and 2.x. |
Thanks @lpsinger. I'll look at this within sbank. |
@spxiwh I think I understand the search issues and will work through those. If you can do a new sbank release that would be good. As Leo said, you just want them built against numpy >= 2.0, you don't need to change the actual install requirements -> https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice |
I'm struggling with the sbank build. It looks like the previous packaging stuff (https://github.com/gwastro/sbank/blob/master/.github/workflows/packaging.yml) was using EL7, which now seems to not work at all. Updating this to EL8 is not working, and I don't really understand why yet. |
Okay, after some help from @duncanmmacleod, a new sbank release has been made with wheels built against numpy 2 (for python > 3.8). The template bank tests are now passing, so over to @ahnitz for the last bit. |
@spxiwh I think we are goo to go now. All the tests pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
* allow numpy 2.0 to run * fix for np2 * fix np2 bug * tmpltbank fixes * fixes * fix string issue * be explicit about types in cases where the input might use type prediction * this place too * cc
The previous PR #4716 allowed python 3.12 tests to run and for that we needed to build against numpy2.0. However, we had not lifted the restriction to require older numpy versions during installation (e.g. after the build). This was originally due to potential incompatibilities and upstream library support.
I am opening this now to see where things stand and if tests look ok, we should lift the restriction or being addressing numpy 2.0 related issues.