diff --git a/python-package/lightgbm/__init__.py b/python-package/lightgbm/__init__.py index 2c4f07dd6e3c..5815bc602bde 100644 --- a/python-package/lightgbm/__init__.py +++ b/python-package/lightgbm/__init__.py @@ -6,7 +6,7 @@ from pathlib import Path from .basic import Booster, Dataset, Sequence, register_logger -from .callback import early_stopping, log_evaluation, print_evaluation, record_evaluation, reset_parameter +from .callback import early_stopping, log_evaluation, record_evaluation, reset_parameter from .engine import CVBooster, cv, train try: @@ -32,5 +32,5 @@ 'train', 'cv', 'LGBMModel', 'LGBMRegressor', 'LGBMClassifier', 'LGBMRanker', 'DaskLGBMRegressor', 'DaskLGBMClassifier', 'DaskLGBMRanker', - 'log_evaluation', 'print_evaluation', 'record_evaluation', 'reset_parameter', 'early_stopping', + 'log_evaluation', 'record_evaluation', 'reset_parameter', 'early_stopping', 'plot_importance', 'plot_split_value_histogram', 'plot_metric', 'plot_tree', 'create_tree_digraph'] diff --git a/python-package/lightgbm/callback.py b/python-package/lightgbm/callback.py index 5b4e3f194c31..5804541c7bba 100644 --- a/python-package/lightgbm/callback.py +++ b/python-package/lightgbm/callback.py @@ -57,16 +57,6 @@ def _format_eval_result(value: list, show_stdv: bool = True) -> str: raise ValueError("Wrong metric value") -def print_evaluation(period: int = 1, show_stdv: bool = True) -> Callable: - """Create a callback that logs the evaluation results. - - Deprecated, use ``log_evaluation()`` instead. - """ - _log_warning("'print_evaluation()' callback is deprecated and will be removed in a future release of LightGBM. " - "Use 'log_evaluation()' callback instead.") - return log_evaluation(period=period, show_stdv=show_stdv) - - def log_evaluation(period: int = 1, show_stdv: bool = True) -> Callable: """Create a callback that logs the evaluation results.