Skip to content

chore(examples): Use QuantileDMatrix for histogram tree method in XGBoost example#3375

Closed
sunalawa wants to merge 2 commits intokubeflow:masterfrom
sunalawa:chore/xgboost-quantile-dmatrix
Closed

chore(examples): Use QuantileDMatrix for histogram tree method in XGBoost example#3375
sunalawa wants to merge 2 commits intokubeflow:masterfrom
sunalawa:chore/xgboost-quantile-dmatrix

Conversation

@sunalawa
Copy link
Copy Markdown
Contributor

Replace DMatrix with QuantileDMatrix in distributed XGBoost training example.
This reduces memory usage and aligns with XGBoost best practices for distributed workloads

What this PR does / why we need it:

Updates the distributed XGBoost example to use QuantileDMatrix instead of DMatrix.
This reduces memory usage and follows XGBoost best practices for distributed training workloads.

Which issue(s) this PR fixes

Fixes #3300

Checklist:

  • Docs included if any changes are user facing

…oost example

Replace DMatrix with QuantileDMatrix in distributed XGBoost training
example. This reduces memory usage and aligns with XGBoost best practices
for distributed workloads

Fixes kubeflow#3300
Copilot AI review requested due to automatic review settings March 23, 2026 09:49
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign astefanutti for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions
Copy link
Copy Markdown

🎉 Welcome to the Kubeflow Trainer! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards.
  • Our team will review your PR soon! cc @kubeflow/kubeflow-trainer-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the distributed XGBoost training example notebook to use QuantileDMatrix instead of DMatrix, aiming to reduce memory usage and align the example with histogram-based training best practices.

Changes:

  • Replace xgb.DMatrix with xgb.QuantileDMatrix for training and validation data construction.
  • Update the notebook note to reflect QuantileDMatrix construction requirements within the communicator context.

Comment thread examples/xgboost/distributed-training/xgboost-distributed.ipynb Outdated
Comment thread examples/xgboost/distributed-training/xgboost-distributed.ipynb
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Suyash Nalawade <81951809+sunalawa@users.noreply.github.com>
@sunalawa sunalawa closed this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chore(Example):Use QuantileDMatrix when hist tree method is used in distributed XGBoost example

2 participants