Skip to content

Compatibility fix for XGBoost 3.2#655

Merged
hcho3 merged 3 commits intodmlc:mainlinefrom
hcho3:support_xgboost32
Feb 24, 2026
Merged

Compatibility fix for XGBoost 3.2#655
hcho3 merged 3 commits intodmlc:mainlinefrom
hcho3:support_xgboost32

Conversation

@hcho3
Copy link
Collaborator

@hcho3 hcho3 commented Feb 24, 2026

Since dmlc/xgboost#11814, XGBoost stores leaf weights as a separate field for multi-target trees.

Since multi-target trees are an experimental feature, we do not provide a compatibility layer for older versions of multi-target trees.

@hcho3
Copy link
Collaborator Author

hcho3 commented Feb 24, 2026

@trivialfis Can you help review? This updates Treelite to support new layout for multi-target trees.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.38%. Comparing base (411113b) to head (5c785fd).
⚠️ Report is 1 commits behind head on mainline.

Files with missing lines Patch % Lines
...el_loader/detail/xgboost_json/delegated_handler.cc 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           mainline     #655      +/-   ##
============================================
+ Coverage     84.35%   84.38%   +0.03%     
============================================
  Files            75       75              
  Lines          6653     6653              
  Branches        543      543              
============================================
+ Hits           5612     5614       +2     
+ Misses         1041     1039       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

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

The change looks good. What do you think of the new layout? Theoretically, the leaf weight can be omitted if reduced gradient is not used. But making an optional field makes the code and more complex.

@hcho3
Copy link
Collaborator Author

hcho3 commented Feb 24, 2026

@trivialfis Is reduced gradient only applicable for multi-target trees? If so, I like the layout.

@hcho3 hcho3 merged commit 86cb6ba into dmlc:mainline Feb 24, 2026
20 checks passed
@hcho3 hcho3 deleted the support_xgboost32 branch February 24, 2026 05:58
@trivialfis
Copy link
Member

Yes, vector leaf only

rapids-bot bot pushed a commit to rapidsai/cuml that referenced this pull request Mar 13, 2026
Update Treelite to 4.7.0 to incorporate the following improvements:
* dmlc/treelite#655
* dmlc/treelite#651

Authors:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - Jim Crist-Harif (https://github.com/jcrist)

Approvers:
  - Jim Crist-Harif (https://github.com/jcrist)
  - James Lamb (https://github.com/jameslamb)
  - Bradley Dice (https://github.com/bdice)

URL: #7870
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.

2 participants