-
Notifications
You must be signed in to change notification settings - Fork 183
MAINT: Set SCIPY_ARRAY_API=1 on tests
#2806
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
MAINT: Set SCIPY_ARRAY_API=1 on tests
#2806
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| # if `array-api-compat` package is present in environment | ||
| # TODO: create generic approach to handle this for all tests | ||
| if sklearn_check_version("1.6"): | ||
| environ["SCIPY_ARRAY_API"] = "1" |
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.
Why remove this?
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.
Because it has no effect when done after importing scipy. It is now set from the test runner script instead.
SCIPY_ARRAY_API=1 on conda testsSCIPY_ARRAY_API=1 on tests
|
/intelci: run |
|
CI looks good, haven't reviewed in full yet but should be able to by end of week. No objections from my end though. |
Description
Sets env. variable
SCIPY_ARRAY_API=1for the tests runner scripts, which is required in order for all array API functionalities in sklearn to work.Note that some tests were setting this environment variable manually, but it only has an effect when set before scipy is imported, so this logic was actually incorrect:
https://docs.scipy.org/doc/scipy/dev/api-dev/array_api.html
Checklist:
Completeness and readability
Testing