Remove xgboost demos and dependency - #15219
Merged
Merged
Conversation
Drop machine_learning/xgboost_classifier.py and machine_learning/xgboost_regressor.py. Both were thin "how-to-use" wrappers around sklearn's XGBClassifier/XGBRegressor rather than from-scratch implementations, and the classifier's only doctest was already disabled (# THIS TEST IS BROKEN!!), so it was never exercised in CI. xgboost is one of the heaviest compiled dependencies in the tree (large wheel, needs OpenMP/libgomp at runtime, no free-threaded wheel yet), and gradient boosting is already implemented from scratch in machine_learning/gradient_boosting_classifier.py and gradient_boosting_regressor.py, so no algorithm coverage is lost. Removes the xgboost dependency from pyproject.toml, its (and its xgboost-only transitive dep nvidia-nccl-cu13) entries from uv.lock, and the two DIRECTORY.md links. Refs TheAlgorithms#15081
cclauss
enabled auto-merge (squash)
September 7, 2026 07:48
cclauss
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Per @cclauss's request in #15081, this drops
xgboost.Fixes: #14224
@Moddy2024
What changes
machine_learning/xgboost_classifier.pyandmachine_learning/xgboost_regressor.py. Both are thin how-to-use wrappers around sklearn'sXGBClassifier/XGBRegressor(fit → predict → confusion matrix on an sklearn toy dataset), not from-scratch implementations. The classifier's only meaningful doctest was already disabled (# THIS TEST IS BROKEN!!), so it was never exercised in CI.xgboost>=2.1.3dependency frompyproject.toml, and its (plus its xgboost-only transitive depnvidia-nccl-cu13) entries fromuv.lock.DIRECTORY.mdlinks.Why
xgboostis one of the heaviest deps in the tree — a large compiled wheel that needs OpenMP/libgompat runtime and, as thebuild.ymlfree-threading note calls out, doesn't yet ship acp314twheel. We were carrying all of that for two demos.No algorithm coverage is lost: gradient boosting is already implemented from scratch in
machine_learning/gradient_boosting_classifier.py(a realclass GradientBoostingClassifierbuilt onDecisionTreeRegressorstumps) andgradient_boosting_regressor.py.Refs #15081.
Checklist