Use UserWarning for old callback, as DeprecationWarning is not visible (#6270)
This commit is contained in:
committed by
GitHub
parent
1300467d36
commit
677f676172
@@ -14,7 +14,7 @@ def _configure_deprecated_callbacks(
|
||||
verbose_eval, early_stopping_rounds, maximize, start_iteration,
|
||||
num_boost_round, feval, evals_result, callbacks, show_stdv, cvfolds):
|
||||
link = 'https://xgboost.readthedocs.io/en/latest/python/callbacks.html'
|
||||
warnings.warn(f'Old style callback is deprecated. See: {link}', DeprecationWarning)
|
||||
warnings.warn(f'Old style callback is deprecated. See: {link}', UserWarning)
|
||||
# Most of legacy advanced options becomes callbacks
|
||||
if early_stopping_rounds is not None:
|
||||
callbacks.append(callback.early_stop(early_stopping_rounds,
|
||||
|
||||
Reference in New Issue
Block a user