Skip to content

Move DART state into GBTree#12078

Merged
RAMitchell merged 9 commits into
dmlc:masterfrom
RAMitchell:merge-dart-into-gbtree-next
Mar 13, 2026
Merged

Move DART state into GBTree#12078
RAMitchell merged 9 commits into
dmlc:masterfrom
RAMitchell:merge-dart-into-gbtree-next

Conversation

@RAMitchell

@RAMitchell RAMitchell commented Mar 12, 2026

Copy link
Copy Markdown
Member

This PR is the next step toward removing GBDart as a separate booster. It moves the DART runtime state and training-time dropout behavior into GBTree, so dropout can be enabled directly through parameters like rate_drop without requiring booster=dart. The legacy Dart class remains as a thin compatibility wrapper for the existing booster name and serialized model/config shape. A follow-up PR will load old DART models/configs directly into unified GBTree state and remove the separate Dart class.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR moves DART (Dropout Additive Regression Trees) runtime state and training-time dropout behavior from the separate Dart class into the base GBTree class. This allows dropout to be enabled directly through parameters like rate_drop when using booster=gbtree, without requiring booster=dart. The Dart class is retained as a thin compatibility wrapper for existing serialized models/configs.

Changes:

  • Moved weight_drop_, idx_drop_, dparam_, DropTrees(), NormalizeTrees(), and dropout-aware prediction logic from Dart into GBTree.
  • Simplified Dart to a thin wrapper that only overrides serialization methods (SaveModel, LoadModel, SaveConfig, LoadConfig) and CommitModel for backward compatibility with the "dart" JSON format.
  • Updated documentation (parameter.rst, dart.rst) and tests to reflect that dropout is now a feature of gbtree rather than a separate booster.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/gbm/gbtree.h Added dparam_, weight_drop_, idx_drop_ members and DropTrees/NormalizeTrees declarations to GBTree; made TreeWeights non-virtual.
src/gbm/gbtree.cc Moved dropout logic (DropTrees, NormalizeTrees, weight tracking in CommitModel, PredictBatch, InplacePredict, Slice, serialization) into GBTree; stripped Dart down to a compatibility wrapper.
tests/cpp/gbm/test_gbtree.cc Added GBTree_DropoutJsonIO test verifying gbtree with rate_drop saves/loads correctly.
doc/parameter.rst Renamed DART section to "Additional dropout parameters for tree boosters" and removed DART-specific predict note.
doc/tutorials/dart.rst Updated tutorial to describe dropout as a mode of gbtree rather than a separate booster.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread doc/parameter.rst Outdated
Comment thread src/gbm/gbtree.h Outdated
@RAMitchell
RAMitchell requested a review from trivialfis March 12, 2026 15:06
@RAMitchell
RAMitchell merged commit 4f18c88 into dmlc:master Mar 13, 2026
78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants