[ENH]: Add XGBoost and XGBoost with CV Early Stopping#306
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #306 +/- ##
==========================================
+ Coverage 89.00% 89.17% +0.16%
==========================================
Files 58 59 +1
Lines 2847 2947 +100
Branches 507 521 +14
==========================================
+ Hits 2534 2628 +94
- Misses 210 214 +4
- Partials 103 105 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces XGBoost-based models to julearn, including a custom wrapper that uses a holdout split (optionally group-aware) to determine n_estimators via early stopping, and registers these models for pipeline use. It also broadens scope with logging optimizations (delayed formatting + reduced feature logging), joblib-htcondor backend context propagation, documentation updates, and CI/workflow action version bumps.
Changes:
- Add
xgboostdependency and registerxgb/xgb_cvearlystoppingmodels (plus new tests). - Add
DelayedFmtMessageand refactor many logs to be lazily formatted; addmax_x_logsto limit verbose feature logging. - Add joblib-htcondor backend context propagation for config/logging/sklearn settings; update docs and GitHub Actions.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Locks new dependency graph including xgboost (and platform-specific wheels). |
pyproject.toml |
Adds xgboost to core dependencies. |
julearn/utils/logging.py |
Introduces DelayedFmtMessage for delayed log formatting. |
julearn/transformers/target/ju_generated_target_model.py |
Switches debug logs to delayed formatting. |
julearn/transformers/target/available_target_transformers.py |
Switches info log to delayed formatting. |
julearn/transformers/dataframe/set_column_types.py |
Switches debug logs to delayed formatting. |
julearn/transformers/dataframe/pick_columns.py |
Switches debug log to delayed formatting. |
julearn/transformers/dataframe/drop_columns.py |
Switches debug log to delayed formatting. |
julearn/transformers/available_transformers.py |
Switches info log to delayed formatting. |
julearn/scoring/available_scorers.py |
Switches logs to delayed formatting; refactors scoring debug message. |
julearn/prepare.py |
Limits feature logging via new max_x_logs; switches logs to delayed formatting. |
julearn/pipeline/pipeline_creator.py |
Switches many info/debug logs to delayed formatting. |
julearn/models/xgb_cvearlystopping.py |
Adds XGBoost CV/early-stopping wrapper estimators. |
julearn/models/tests/test_xgb_cvearlystopping.py |
Adds tests for grouped/non-grouped fitting behavior. |
julearn/models/available_models.py |
Registers xgb and xgb_cvearlystopping models. |
julearn/model_selection/available_searchers.py |
Refactors logging to delayed formatting. |
julearn/model_selection/_skopt_searcher.py |
Refactors logging to delayed formatting. |
julearn/model_selection/_optuna_searcher.py |
Refactors logging to delayed formatting. |
julearn/config.py |
Adds max_x_logs; adds joblib-htcondor context function helper; delayed formatting in config logging. |
julearn/api.py |
Adds joblib backend detection/configuration hook; delayed formatting in logs. |
docs/configuration.rst |
Documents config defaults and adds max_x_logs. |
docs/changes/newsfragments/303.feature |
Adds release note fragment for joblib-htcondor context propagation. |
docs/changes/newsfragments/301.misc |
Adds release note fragment for delayed log formatting. |
docs/available_pipeline_steps.rst |
Documents the new xgb pipeline step. |
.github/workflows/publish.yml |
Bumps softprops/action-gh-release major version. |
.github/workflows/ci.yml |
Bumps codecov/codecov-action major version. |
.github/workflows/ci-docs.yml |
Bumps codecov/codecov-action major version for docs CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2821029 to
0862693
Compare
|
2200d1f to
87c0546
Compare
This PR adds XGBoost as well as a custom XGBoost which uses CV and early stopping to determine the amount of trees to use.