Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Remove print_evaluation() function #4819

Merged
merged 2 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python-package/lightgbm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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']
10 changes: 0 additions & 10 deletions python-package/lightgbm/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down