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
55e9446a
Unverified
Commit
55e9446a
authored
Nov 05, 2021
by
Nikita Titov
Committed by
GitHub
Nov 05, 2021
Browse files
[python] improve warning message about aliases in `cv()` function (#4766)
parent
2394b41a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python-package/lightgbm/engine.py
python-package/lightgbm/engine.py
+1
-1
No files found.
python-package/lightgbm/engine.py
View file @
55e9446a
...
@@ -570,7 +570,7 @@ def cv(params, train_set, num_boost_round=100,
...
@@ -570,7 +570,7 @@ def cv(params, train_set, num_boost_round=100,
params
[
'objective'
]
=
'none'
params
[
'objective'
]
=
'none'
for
alias
in
_ConfigAliases
.
get
(
"num_iterations"
):
for
alias
in
_ConfigAliases
.
get
(
"num_iterations"
):
if
alias
in
params
:
if
alias
in
params
:
_log_warning
(
f
"Found
`
{
alias
}
`
in params. Will use it instead of argument"
)
_log_warning
(
f
"Found
'
{
alias
}
'
in params. Will use it instead of
'num_boost_round'
argument"
)
num_boost_round
=
params
.
pop
(
alias
)
num_boost_round
=
params
.
pop
(
alias
)
params
[
"num_iterations"
]
=
num_boost_round
params
[
"num_iterations"
]
=
num_boost_round
if
early_stopping_rounds
is
not
None
and
early_stopping_rounds
>
0
:
if
early_stopping_rounds
is
not
None
and
early_stopping_rounds
>
0
:
...
...
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