Skip to content

Commit

Permalink
[docs] add a note about DART in early_stopping docstring (#6846)
Browse files Browse the repository at this point in the history
* [python-package] add a note about DART in early_stopping docstring

* add note in R docs too
  • Loading branch information
jameslamb authored Mar 4, 2025
1 parent f7c641d commit 6437645
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R-package/R/lightgbm.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
#' in \code{params}, that metric will be considered the "first" one. If you omit \code{metric},
#' a default metric will be used based on your choice for the parameter \code{obj} (keyword argument)
#' or \code{objective} (passed into \code{params}).
#'
#' \bold{NOTE:} if using \code{boosting_type="dart"}, any early stopping configuration will be ignored
#' and early stopping will not be performed.
#' @section Model serialization:
#'
#' LightGBM model objects can be serialized and de-serialized through functions such as \code{save}
Expand Down
3 changes: 3 additions & 0 deletions R-package/man/lgb.cv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions R-package/man/lgb.train.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions R-package/man/lgb_shared_params.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions R-package/man/lightgbm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions python-package/lightgbm/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ def early_stopping(
To check only the first metric set ``first_metric_only`` to True.
The index of iteration that has the best performance will be saved in the ``best_iteration`` attribute of a model.
.. note::
If using ``boosting_type="dart"``, this callback has no effect and early stopping
will not be performed.
Parameters
----------
stopping_rounds : int
Expand Down

0 comments on commit 6437645

Please sign in to comment.