Skip to content

Remove xgboost demos and dependency - #15219

Merged
cclauss merged 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:drop-xgboost
Sep 7, 2026
Merged

Remove xgboost demos and dependency#15219
cclauss merged 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:drop-xgboost

Conversation

@priya-sundaram-dev

@priya-sundaram-dev priya-sundaram-dev commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Per @cclauss's request in #15081, this drops xgboost.

Fixes: #14224

@Moddy2024

What changes

  • Removes machine_learning/xgboost_classifier.py and machine_learning/xgboost_regressor.py. Both are thin how-to-use wrappers around sklearn's XGBClassifier/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.
  • Removes the xgboost>=2.1.3 dependency from pyproject.toml, and its (plus its xgboost-only transitive dep nvidia-nccl-cu13) entries from uv.lock.
  • Removes the two DIRECTORY.md links.

Why

xgboost is one of the heaviest deps in the tree — a large compiled wheel that needs OpenMP/libgomp at runtime and, as the build.yml free-threading note calls out, doesn't yet ship a cp314t wheel. 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 real class GradientBoostingClassifier built on DecisionTreeRegressor stumps) and gradient_boosting_regressor.py.

Refs #15081.

Checklist

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This is a maintenance change requested in priya-sundaram-dev as a triager? #15081; it removes files and a dependency rather than adding an algorithm.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.

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
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed enhancement This PR modified some existing files labels Sep 7, 2026
@cclauss
cclauss enabled auto-merge (squash) September 7, 2026 07:48
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 7, 2026
@cclauss
cclauss merged commit 30f321f into TheAlgorithms:master Sep 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants