Repository navigation
DOC Add information on sample_weight auto-routing to glossary and user guide - #35111
Merged
Merged
Conversation
ogrisel
approved these changes
Oct 12, 2026
ogrisel
left a comment
Member
There was a problem hiding this comment.
The diff LGTM but let's wait for the linked PR to be reviewed before merging this one to make sure that the docs always reflect the curent state of the main branch.
antoinebaker
approved these changes
Oct 20, 2026
Comment on lines
+303
to
+305
| your `sample_weight` through a router without calling `set_fit_request` or | ||
| `set_score_request`. Use `set_{method}_request` when you need to opt out, set an alias, | ||
| or handle a consumer that does not auto-request the metadata you pass. |
Member
There was a problem hiding this comment.
I think it's a bit clearer that way, but feel free to ignore if you prefer your version.
Suggested change
| your `sample_weight` through a router without calling `set_fit_request` or | |
| `set_score_request`. Use `set_{method}_request` when you need to opt out, set an alias, | |
| or handle a consumer that does not auto-request the metadata you pass. | |
| directly your `sample_weight` through a router, there is no need to call `set_fit_request` or | |
| `set_score_request` explicitly. Use `set_{method}_request` only when you need to opt out, set an alias, | |
| or handle a consumer that does not yet auto-request the metadata you pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
towards #34901
What does this implement/fix? Explain your changes.
This adds a few sentences on
sample_weightbeing auto-routed everywhere in scikit-learn to the glossary and the metadata routing user guide. (Documenting it in the glossary as compared to in every docstring is a resolution from our meeting on Oct 7th.)All of this really only takes effect after #35099, #34966 and #35095 are merged, but we are optimistic that all of these go into 1.10. 🎸
AI usage disclosure
I used AI assistance for: