Skip to content

Conversation

@ogrisel
Copy link
Member

@ogrisel ogrisel commented Dec 9, 2025

I think this kind of test would have help identify some of the problem discovered during the release process earlier.

Note that it still fails because Ridge and LinearDiscriminantAnalysis still do not accept mixed-array inputs (see #28668).

Not sure if we should fix that here or in a PR that introduces a common test for that particular problem.

EDIT: I started to push a fix for the regression case to investigate all the possibly cascading bugs to fix (hiding one after the other). For the regression case we need both #28668 and #32755 and this is enough.

For classification, it seems that there is extra work needed in the private scorer code on top of updating the classifier and the metrics functions themselves.

(
RidgeClassifier(),
3,
["accuracy"],
Copy link
Member Author

Choose a reason for hiding this comment

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

I would like to add "roc_auc" or "average_precision" here, but they do not yet support array API at this time: #26024.

@ogrisel
Copy link
Member Author

ogrisel commented Dec 11, 2025

Note that we have the same need for float64/float32 move/downcast to the MPS device as already being investigated in #32755. I will wait for #32755 to be completed before updating this draft PR in that respect.

Comment on lines +227 to +231
# Ensure that all inputs are on the y_pred device and namespace.
y_true = move_to(y_true, xp=xp, device=device)
sample_weight = move_to(sample_weight, xp=xp, device=device)
if hasattr(multioutput, "shape"):
multioutput = move_to(multioutput, xp=xp, device=device)
Copy link
Member

Choose a reason for hiding this comment

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

Why not just leave this to _check_reg_targets to handle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants