Skip to content

ENH: Update numpy exceptions imports#27013

Merged
betatim merged 3 commits intoscikit-learn:mainfrom
mtsokol:update-np-exceptions-imports
Aug 8, 2023
Merged

ENH: Update numpy exceptions imports#27013
betatim merged 3 commits intoscikit-learn:mainfrom
mtsokol:update-np-exceptions-imports

Conversation

@mtsokol
Copy link
Copy Markdown
Contributor

@mtsokol mtsokol commented Aug 4, 2023

Reference Issues/PRs

Connected to numpy/numpy#24316.

What does this implement/fix? Explain your changes.

Due to NumPy's main namespace being changed in numpy/numpy#24316, here I update warning imports.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 69c2f99. Link to the linter CI: here

@mtsokol mtsokol force-pushed the update-np-exceptions-imports branch from 785d4f8 to d44672a Compare August 7, 2023 08:36
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! I think the following lines can be updated to catch VisibleDeprecationWarning moving forward:

TEST_CMD="$TEST_CMD -Werror::DeprecationWarning -Werror::FutureWarning -Werror::numpy.VisibleDeprecationWarning"

The np.VisibleDeprecationWarning can be replaced with:

-Werror::sklearn.utils.fixes.VisibleDeprecationWarning

@mtsokol mtsokol force-pushed the update-np-exceptions-imports branch from b9c4c60 to 2447534 Compare August 7, 2023 17:20
@mtsokol
Copy link
Copy Markdown
Contributor Author

mtsokol commented Aug 7, 2023

@thomasjpfan Sure! I updated the Azure CI script.

Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan added the Waiting for Second Reviewer First reviewer is done, need a second one! label Aug 7, 2023
Copy link
Copy Markdown
Contributor

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM too. I'm merging the upstream PR with the removals now, so I'd suggest to get this in to avoid failures when the next numpy nightly is uploaded.

@betatim betatim merged commit 62b9e4a into scikit-learn:main Aug 8, 2023
@mtsokol mtsokol deleted the update-np-exceptions-imports branch August 8, 2023 07:25
TamaraAtanasoska pushed a commit to TamaraAtanasoska/scikit-learn that referenced this pull request Aug 21, 2023
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 18, 2023
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:utils Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants