Skip to content

FIX always return None as device when array API dispatch is disabled - #29119

Merged
OmarManzoor merged 3 commits into
scikit-learn:mainfrom
ogrisel:fix-r2_score-on-torch-cpu-tensors
May 28, 2024
Merged

OmarManzoor merged 3 commits into
scikit-learn:mainfrom
ogrisel:fix-r2_score-on-torch-cpu-tensors

Conversation

@ogrisel

@ogrisel ogrisel commented May 27, 2024 •

Copy link
Copy Markdown
Member

Fixes #29107.

I manually checked that it fixes the problem described in the original report. I think the new unit test is good enough as non-regression test.

@github-actions

github-actions Bot commented May 27, 2024 •

Copy link
Copy Markdown

✔️ Linting Passed

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

Generated for commit: 9dbf05f. Link to the linter CI: here

Comment thread sklearn/utils/tests/test_array_api.py Resolved
@ogrisel ogrisel added this to the 1.5.1 milestone May 27, 2024
@ogrisel ogrisel added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label May 27, 2024

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks @ogrisel

@OmarManzoor
OmarManzoor merged commit 78102fd into scikit-learn:main May 28, 2024
@jph00

jph00 commented May 28, 2024

Copy link
Copy Markdown

Thank you @ogrisel ! :D

jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 2, 2024
@jeremiedbb jeremiedbb mentioned this pull request Jul 2, 2024
11 tasks done
@ogrisel
ogrisel deleted the fix-r2_score-on-torch-cpu-tensors branch December 10, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:utils To backport PR merged in master that need a backport to a release branch defined based on the milestone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect invalid device error introduced in #25956

4 participants