Skip to content

fix: align verbose default in XGBRanker.fit() with other estimators#12184

Merged
trivialfis merged 1 commit into
dmlc:masterfrom
twdavisx:fix/xgbranker-verbose-default
Apr 27, 2026
Merged

fix: align verbose default in XGBRanker.fit() with other estimators#12184
trivialfis merged 1 commit into
dmlc:masterfrom
twdavisx:fix/xgbranker-verbose-default

Conversation

@twdavisx

@twdavisx twdavisx commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

XGBRanker.fit() had verbose=False as its default while XGBModel,
XGBClassifier, and XGBRegressor all default to verbose=True. This
caused inconsistent behavior when eval_set was provided — XGBRanker
would silently suppress evaluation output while all other estimators
printed it by default.

Changed verbose default in XGBRanker.fit() from False to True
to match the rest of the sklearn API.

Added test_verbose_default_consistency to verify that verbose defaults to the same value across all sklearn estimators

Addresses #12183

@twdavisx
twdavisx force-pushed the fix/xgbranker-verbose-default branch from f36b3a9 to ca13ed7 Compare April 26, 2026 20:41
@trivialfis
trivialfis merged commit 9460d67 into dmlc:master Apr 27, 2026
79 of 80 checks passed
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.

2 participants