Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT Remove the None option for ScoringMonitor's scoring argument - #34590

Merged
ogrisel merged 9 commits into
scikit-learn:mainfrom
FrancoisPgm:no_default_scorer
Aug 4, 2026
Merged

MNT Remove the None option for ScoringMonitor's scoring argument#34590
ogrisel merged 9 commits into
scikit-learn:mainfrom
FrancoisPgm:no_default_scorer

Conversation

@FrancoisPgm

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Requested in the review of #34137

What does this implement/fix? Explain your changes.

Passing scoring=None to ScoringMonitor made it possible to use the estimator's default scorer. But this required some annoying workarounds, especially when the same callback is attached to multiple estimators. It also introduces complexity when trying to incorporate metadata routing in callbacks, as is done in #34137. Thus it was proposed to drop this niche case and remove the scoring=None option.

Any other comments?

ping @jeremiedbb

@FrancoisPgm

Copy link
Copy Markdown
Contributor Author

Since the callbacks are documented as experimental, I believe this change does not need a deprecation cycle.

Comment thread sklearn/callback/_scoring_monitor.py Outdated
Comment thread sklearn/callback/_scoring_monitor.py Outdated
@jeremiedbb

Copy link
Copy Markdown
Member

Since the callbacks are documented as experimental, I believe this change does not need a deprecation cycle.

not a deprecation, but we should add a changelog entry to signal the API change still.

@jeremiedbb

Copy link
Copy Markdown
Member

Looks like we didn't have any test for scoring=None :)

@@ -0,0 +1,3 @@
- In :class:`callback.ScoringMonitor`, the option to provide `scoring=None` to have the
default scorer of the estimator has been removed.
By :user:`François Paugam <FrancoisPgm>`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd name that file 34590.api.rst. It is an api change. Also, we're not mapping mnt to anything :)

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM besides the changelog file name.

@FrancoisPgm FrancoisPgm added this to Labs Aug 3, 2026
@FrancoisPgm FrancoisPgm moved this to PR waiting for reviews in Labs Aug 3, 2026

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM as well.

@ogrisel
ogrisel merged commit eb6b61f into scikit-learn:main Aug 4, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from PR waiting for reviews to Done in Labs Aug 4, 2026
@FrancoisPgm
FrancoisPgm deleted the no_default_scorer branch August 5, 2026 09:30
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
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.

3 participants