8000 MNT improve UnsetMetadataPassedError error message and fix disable metadata routing in examples by StefanieSenger · Pull Request #31069 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MNT improve UnsetMetadataPassedError error message and fix disable metadata routing in examples #31069

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

Conversation

StefanieSenger
Copy link
Contributor
@StefanieSenger StefanieSenger commented Mar 25, 2025

Reference Issues/PRs

Addressing this comment: #31014 (comment)

What does this implement/fix? Explain your changes.

Adds a link to the metadata routing part of the user guide to the error message when requests are not properly set.

Fixes CI failures that stem from metadata routing not being disabled in some of the examples. (I am not sure why this didn't pop up earlier, but this PR is now also fixing this. )

CC @adrinjalali

Copy link
github-actions bot commented Mar 25, 2025

✔️ Linting Passed

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

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

@StefanieSenger StefanieSenger changed the title MNT add link to UnsetMetadataPassedError error message MNT improve UnsetMetadataPassedError error message and fix disable metadata routing in examples Mar 28, 2025
@StefanieSenger
Copy link
Contributor Author
StefanieSenger commented Mar 28, 2025

It seems the CI brings out an old regression that had already been fixed. I cannot re-create this locally and I would also think it's unrelated to this PR. Or could it actually be that properly disabling metadata routing after the execution of the examples influecences how sample_weight gets passed into estimator_weighted in _check_sample_weight_equivalence?

estimator_weighted.fit(X_weighted, y=y_weighted, sample_weight=sw)

Maybe @antoinebaker, would you mind having a look? Since you have worked on several PRs in this realm grouped around issue: #30131

@antoinebaker
Copy link
Contributor

Yes it's unrelated to this PR, it's a general CI failure to fix #31098.

@StefanieSenger
Copy link
Contributor Author

Oh thank you, @antoinebaker, I had missed the issue.

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.

Nice catches @StefanieSenger

@adrinjalali
Copy link
Member

Once #31124 is merged, we need to merge with main and then the CI should pass.

@adrinjalali adrinjalali merged commit efe2b76 into scikit-learn:main Apr 2, 2025
36 checks passed
@StefanieSenger StefanieSenger deleted the UnsetMetadataPassedError branch April 2, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0