Skip to content

[Experimental] Update ML deps extras - #40531

Draft
jrmccluskey wants to merge 3 commits into
apache:masterfrom
jrmccluskey:ml-test-deps-py311
Draft

jrmccluskey wants to merge 3 commits into
apache:masterfrom
jrmccluskey:ml-test-deps-py311

Conversation

@jrmccluskey

Copy link
Copy Markdown
Contributor

Experimental LLM driven update of our ML dependency extra lists to modernize the suite and get more of these tests running regularly again.

DO NOT MERGE

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.35%. Comparing base (76f6e6d) to head (77f3dc8).
⚠️ Report is 168 commits behind head on master.

Files with missing lines Patch % Lines
sdks/python/setup.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40531      +/-   ##
============================================
+ Coverage     56.16%   56.35%   +0.19%     
  Complexity     2288     2288              
============================================
  Files          1124     1125       +1     
  Lines        178336   178453     +117     
  Branches       1489     1489              
============================================
+ Hits         100170   100576     +406     
+ Misses        75645    75356     -289     
  Partials       2521     2521              
Flag Coverage Δ
python 79.93% <0.00%> (+0.37%) ⬆️

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.

@jrmccluskey

Copy link
Copy Markdown
Contributor Author

/gemini review

@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 Python ML test dependency extras in sdks/python/setup.py to re-enable tensorflow_transform (1.21.x), xgboost (>=2.1.3 on Python 3.11–3.12), and google-adk (2.x) alongside Python 3.14 environment markers, while fixing two downstream test compatibility issues with newer XGBoost and NumPy versions. The dependency bounds and test fixes are well-reasoned, and there are a couple of minor cleanup items in setup.py to keep the extra definitions consistent.

🔍 General Feedback

  • The test fixes in xgboost_inference_test.py and base_test.py cleanly address attribute persistence across model reloads and NumPy >= 2.4 scalar conversion rules.
  • In sdks/python/setup.py, a few related standalone/legacy extras (xgboost, ml_test, p310_ml_test) and duplicate tokenizers entries in ml_base_core could be aligned with the updated dependency bounds.

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

💬 Inline Findings

  • sdks/python/setup.py (line 211): 🟢 Low: ml_base_core currently specifies tokenizers twice: 'tokenizers<0.23' here on line 211 and 'tokenizers>=0.13.3,<0.22.0' on line 217 (which is strictly narrower and makes <0.23 redundant). Consider consolidating these into a single tokenizers requirement entry so the version cap and accompanying comment stay in sync.

  • sdks/python/setup.py (line 623): 🟢 Low: Since python_requires = '>=3.11' (and tox.ini only defines py311-ml through py314-ml), p310_ml_test appears to be unused. In addition, the standalone 'xgboost' extra further down (line 699: 'xgboost': ['xgboost>=1.6.0,<2.1.3', 'datatable==1.0.0']) still caps xgboost<2.1.3, which contradicts 'xgboost>=2.1.3' added here for p311_ml_test and p312_ml_test. Consider removing p310_ml_test and updating the 'xgboost' extra bound to match.

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.

1 participant