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

CI/TST: fix tests for compat with numpy 2+ when using legacy promotion #60140

Closed

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Oct 30, 2024

This is trying to fix the current failures on main.

It seems that our test runs were still using numpy 1.26 (because of some downgrade after initial env creation because of removing nomkl), but that stopped being the case some hours ago. This turns up a bunch of failures in our tests when running hem with numpy >= 2 ánd with NPY_PROMOTION_STATE=legacy.

We should properly fix this situation (stop using the legacy promotion state), but this PR should already get CI green again.

@jorisvandenbossche jorisvandenbossche added CI Continuous Integration Compat pandas objects compatability with Numpy or Python functions labels Oct 30, 2024
@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Oct 30, 2024
@jorisvandenbossche
Copy link
Member Author

This does not yet fix the macos and arm failure (those are also failing on main, and separate issues)

@jorisvandenbossche
Copy link
Member Author

This does not yet fix the macos and arm failure (those are also failing on main, and separate issues)

-> #60143

@seberg
Copy link
Contributor

seberg commented Oct 30, 2024

We should properly fix this situation (stop using the legacy promotion state), but this PR should already get CI green again.

Saw this randomly. Is that hard? I mean, I think you can just remove any setting of NPY_PROMOTION_STATE from CI, and if you still have issues, then you don't have to worry one way or another.

(I was planning to remove support for it in 2.2, I thought I already did in the nightlies, but maybe not.)

@jorisvandenbossche
Copy link
Member Author

No idea, let's see in #60144

(I was planning to open an issue about it, because in addition to CI I think there is also the discussion about "following" the new behaviour of numpy)

@seberg
Copy link
Contributor

seberg commented Oct 30, 2024

Well, FYI, I was planning to remove this in NumPy 2.2. I would have guessed that I already did in the nightlies...
This is a debugging/transition feature, I suppose it is nice if you support it to some degree (since someone who uses it for testing may also use pandas), but overall...

@jorisvandenbossche
Copy link
Member Author

Well, FYI, I was planning to remove this in NumPy 2.2. I would have guessed that I already did in the nightlies...

Yeah, we already ran into np._get_promotion_state being removed, but that is fixed (#59818).
AFAIU the main reason we still have this env variable set is for numpy 1.26

@jorisvandenbossche
Copy link
Member Author

In any case, it seems to be working fine to completely remove the usage of the env variable -> #60144

@jorisvandenbossche
Copy link
Member Author

Closing this in favor of #60144

@jorisvandenbossche jorisvandenbossche deleted the fix-ci-np-2 branch October 31, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants