Unverified Commit 41a1a242 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs][python] fix LGBMRanker docstring (#4306)

parent f076ca58
...@@ -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}")
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