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
41a1a242
Unverified
Commit
41a1a242
authored
May 21, 2021
by
Nikita Titov
Committed by
GitHub
May 21, 2021
Browse files
[docs][python] fix LGBMRanker docstring (#4306)
parent
f076ca58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
python-package/lightgbm/sklearn.py
python-package/lightgbm/sklearn.py
+3
-4
No files found.
python-package/lightgbm/sklearn.py
View file @
41a1a242
...
@@ -1009,7 +1009,6 @@ class LGBMRanker(LGBMModel):
...
@@ -1009,7 +1009,6 @@ class LGBMRanker(LGBMModel):
+
_base_doc
[
_base_doc
.
find
(
'eval_init_score :'
):])
# type: ignore
+
_base_doc
[
_base_doc
.
find
(
'eval_init_score :'
):])
# type: ignore
_base_doc
=
fit
.
__doc__
_base_doc
=
fit
.
__doc__
_before_early_stop
,
_early_stop
,
_after_early_stop
=
_base_doc
.
partition
(
'early_stopping_rounds :'
)
_before_early_stop
,
_early_stop
,
_after_early_stop
=
_base_doc
.
partition
(
'early_stopping_rounds :'
)
fit
.
__doc__
=
(
f
"
{
_before_early_stop
}
"
fit
.
__doc__
=
f
"""
{
_before_early_stop
}
eval_at : iterable of int, optional (default=(1, 2, 3, 4, 5))
"eval_at : iterable of int, optional (default=(1, 2, 3, 4, 5))
\n
"
The evaluation positions of the specified metric.
f
"
{
' '
:
12
}
The evaluation positions of the specified metric.
\n
"
{
_early_stop
}{
_after_early_stop
}
"""
f
"
{
' '
:
8
}{
_early_stop
}{
_after_early_stop
}
"
)
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