Unverified Commit 701e8740 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python] Remove `print_evaluation()` function (#4819)

* Update __init__.py

* Update callback.py
parent 5e9b0209
...@@ -6,7 +6,7 @@ Contributors: https://github.com/microsoft/LightGBM/graphs/contributors. ...@@ -6,7 +6,7 @@ Contributors: https://github.com/microsoft/LightGBM/graphs/contributors.
from pathlib import Path from pathlib import Path
from .basic import Booster, Dataset, Sequence, register_logger 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 from .engine import CVBooster, cv, train
try: try:
...@@ -32,5 +32,5 @@ __all__ = ['Dataset', 'Booster', 'CVBooster', 'Sequence', ...@@ -32,5 +32,5 @@ __all__ = ['Dataset', 'Booster', 'CVBooster', 'Sequence',
'train', 'cv', 'train', 'cv',
'LGBMModel', 'LGBMRegressor', 'LGBMClassifier', 'LGBMRanker', 'LGBMModel', 'LGBMRegressor', 'LGBMClassifier', 'LGBMRanker',
'DaskLGBMRegressor', 'DaskLGBMClassifier', 'DaskLGBMRanker', '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'] 'plot_importance', 'plot_split_value_histogram', 'plot_metric', 'plot_tree', 'create_tree_digraph']
...@@ -57,16 +57,6 @@ def _format_eval_result(value: list, show_stdv: bool = True) -> str: ...@@ -57,16 +57,6 @@ def _format_eval_result(value: list, show_stdv: bool = True) -> str:
raise ValueError("Wrong metric value") 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: def log_evaluation(period: int = 1, show_stdv: bool = True) -> Callable:
"""Create a callback that logs the evaluation results. """Create a callback that logs the evaluation results.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment