Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
701e8740
Unverified
Commit
701e8740
authored
Nov 27, 2021
by
Nikita Titov
Committed by
GitHub
Nov 27, 2021
Browse files
[python] Remove `print_evaluation()` function (#4819)
* Update __init__.py * Update callback.py
parent
5e9b0209
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
python-package/lightgbm/__init__.py
python-package/lightgbm/__init__.py
+2
-2
python-package/lightgbm/callback.py
python-package/lightgbm/callback.py
+0
-10
No files found.
python-package/lightgbm/__init__.py
View file @
701e8740
...
@@ -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'
]
python-package/lightgbm/callback.py
View file @
701e8740
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment