Skip to content

FIX fix scipy bug with sp.hstack in ClassifierChain and RegressorChain #28524

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

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

StefanieSenger
Copy link
Contributor

@StefanieSenger StefanieSenger commented Feb 24, 2024

Reference Issues/PRs

Fixes scipy bug that affected our repo after mergin both #27700 and #27576

What does this implement/fix? Explain your changes.

X is converted to a sparse coo array before hstacking in case it was a sparse dok array before.

Also see discussion on scipy: scipy/scipy#20060 (comment):

Copy link

github-actions bot commented Feb 24, 2024

✔️ Linting Passed

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

Generated for commit: cc8fa2c. Link to the linter CI: here

@StefanieSenger
Copy link
Contributor Author

Ups, failing checks, I will fix that.

@StefanieSenger StefanieSenger changed the title FIX fix scipy bug with hstack in ClassifierChain FIX fix scipy bug with sp.hstack in ClassifierChain Feb 24, 2024
@StefanieSenger StefanieSenger changed the title FIX fix scipy bug with sp.hstack in ClassifierChain FIX fix scipy bug with sp.hstack in ClassifierChain and RegressorChain Feb 24, 2024
@StefanieSenger
Copy link
Contributor Author

StefanieSenger commented Feb 24, 2024

I wonder why ClassifierChain has "_skip_test": True in it's tags? I believe there should be a comment to explain that.
Edit: Here's the explanation: #13337.

@lucyleeow
Copy link
Member

lucyleeow commented Feb 24, 2024

I wonder why ClassifierChain has "_skip_test": True in it's tags

From #13337 (comment), it seems to be because "it's multilabel only, and there's no tag for that and no handling in the common tests."

Slightly related (to this PR) is this issue: #27905, if anyone has thoughts on it?

@StefanieSenger
Copy link
Contributor Author

Yes, and in the meantime we do have multilabel tag. 🌞

@StefanieSenger
Copy link
Contributor Author

I need to do a bit more here, or else the tests fail for scipy versions that did not have sparse arrays. I will figure something out.

Copy link
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

@StefanieSenger do you still want to do something here? It looks good to me.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM!

@StefanieSenger
Copy link
Contributor Author

@adrinjalali
No, I'm done.

@ogrisel ogrisel merged commit 347b109 into scikit-learn:main Feb 26, 2024
@ogrisel
Copy link
Member

ogrisel commented Feb 26, 2024

Thanks for the fix @StefanieSenger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants