GBM DART boosting type incopatible with early stopping #2964
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting
boosting_type: dart
leads to the following error iff an epoch ends with no model improvement:This error is caused by an inconsistency in updating
progress_tracker.best_eval_metric_steps
coupled with DART's incompatibility with the LGBM early stopping callback. LGBM models keep track of the best observed step inmodel.best_iteration_
, however this only happens when the early stopping callback is used; otherwise,best_iteration_
is alwaysNone
. Since DART does not use early stopping, the latter condition seems to be true. Theprogress_tracker
update can then set the step tracker toNone
and subsequently not update it with Ludwig-level tracking if the model did not improveThis update
boosting_type: dart
progress_tracker
updates to use LGBM internal tracking if available with a fallback to Trainer-level tracking