Skip to content

Update xgboost dependency, execute in CI - #40694

Merged
jrmccluskey merged 6 commits into
apache:masterfrom
jrmccluskey:xgboostBump
Oct 21, 2026
Merged

jrmccluskey merged 6 commits into
apache:masterfrom
jrmccluskey:xgboostBump

Conversation

@jrmccluskey

Copy link
Copy Markdown
Contributor

Update the xgboost dependencies (xgboost and datatables,) fix a broken test case that had rotted while xgboost wasn't executing in CI.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📋 Review Summary

This PR updates the xgboost and datatable dependency bounds to xgboost>=2.0.0,<4 and datatable>=1.1.0,<2, re-enables XGBoost unit tests in CI (p311_ml_test, p312_ml_test, and postCommitPyDep tox tasks), and fixes an AttributeError on inference_calls when models are reloaded from disk during pipeline execution.

🔍 General Feedback

  • The dependency updates, test fixture fix, and CI configuration in setup.py, tox.ini, and build.gradle are clean and well-aligned.
  • There are a few minor typos and a placeholder PR link in CHANGES.md that should be cleaned up before merging.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

Comment thread CHANGES.md Outdated
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.06%. Comparing base (a8d6afd) to head (8455404).
⚠️ Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
...thon/apache_beam/ml/inference/xgboost_inference.py 0.00% 2 Missing ⚠️
sdks/python/setup.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #40694      +/-   ##
==========================================
+ Coverage   80.04%   80.06%   +0.01%     
==========================================
  Files         490      490              
  Lines       82916    82955      +39     
==========================================
+ Hits        66373    66417      +44     
+ Misses      16543    16538       -5     
Flag Coverage Δ
python 80.06% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @tvalentyn for label python.
Backup reviewer: claudevdm (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Comment thread sdks/python/setup.py Outdated
# in tox.ini.
xgboost_dependency = [
# xgboost<2.0 wheels fail `pip check` on recent pip ("not supported on this
# platform"), see https://github.com/apache/beam/issues/31285.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

consider pinning a specific comment if this is needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cleaned up the extra verbosity on the comment

Comment thread sdks/python/setup.py
# apache_beam.ml.inference.xgboost_inference imports datatable directly.
# 1.1.0 is the first release with Python 3.10+ wheels; no release has
# wheels for Python 3.13+.
'datatable>=1.1.0,<2',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Given how outdated datatable is, i think the XGBoost MH variation using datatable is no longer relevant; I think we should not make it a mandatory dep for XGBoost users, given there are other MHs that don't need it, and perhaps we should outright remove it due to lack of datatable releases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Datatable hasn't had a release since December of 2023, so I do think it's fair to consider it abandoned. I don't think we really have a good metric of how many users we have for the datatable variation of the model hander; perhaps it would be reasonable to mark the datatable handler as deprecated for this coming beam release, then remove it in the next? That would leave 2.78.0 as a functional release with updated xgboost + datatable support, then we remove it in 2.79.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Went ahead and marked the handler as deprecated, marked it for removal in the 2.79.0 release

Comment thread CHANGES.md
* (Python) `Regex.find_all` with `group=Regex.ALL` now returns every group, as `(match, group1, group2, ...)`, instead of only group 1, and with `outputEmpty=False` it drops a match only when the whole match is empty, matching the `group=0` behavior ([#40399](https://github.com/apache/beam/pull/40399)).
* (Python) `Regex.all_matches` now returns every group of the regex, instead of failing with a `TypeError` when the regex has no groups and dropping nested or unmatched trailing groups ([#40562](https://github.com/apache/beam/issues/40562)).
* (Python) `--dataflow_endpoint` now defaults to `''` instead of `https://dataflow.googleapis.com`. When unset, the Google Cloud client library resolves the Dataflow endpoint and honors `GOOGLE_CLOUD_UNIVERSE_DOMAIN`, so Dataflow jobs can be submitted in non-default universes. Code that reads `GoogleCloudOptions.dataflow_endpoint` should handle an empty value ([#40569](https://github.com/apache/beam/issues/40569)).
* (Python) The `xgboost` extras now install `xgboost>=2.0.0,<4` and `datatable>=1.1.0,<2`, moving both the lower and upper bounds for both. The previous minimum `xgboost` and `datatable` versions (`1.6.0` and `1.0.0` respectively) are no longer allowed ([#40694](https://github.com/apache/beam/issues/40694)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we should update xgboost inference docstring which currently says:

    **Supported Versions:** RunInference APIs in Apache Beam have been tested
    with XGBoost 1.6.0 and 1.7.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated

@jrmccluskey
jrmccluskey requested a review from tvalentyn October 21, 2026 15:21

@tvalentyn tvalentyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's file an issue that targets the next release to follow up on the deprecation.

Thanks!

@jrmccluskey

jrmccluskey commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Dependency postcommit breakages are numpy/pandas (fixed in #40704), pytorch (fix in-flight) and transformers (not yet started)

@jrmccluskey

Copy link
Copy Markdown
Contributor Author

Let's file an issue that targets the next release to follow up on the deprecation.

Thanks!

Filed as #40705 and put on the 2.79.0 milestone

@jrmccluskey
jrmccluskey merged commit b4f9f3e into apache:master Oct 21, 2026
95 of 97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants