Repository navigation
Update pytorch dependencies - #40710
jrmccluskey wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR updates the PyTorch dependency configuration by removing the upper version bound on torch, bumping the minimum supported version to 2.3.0, and consolidating the tox and Gradle test suites to test the lower bound (pytorch-23) and pytorch-latest across Python 3.11 and 3.14.
🔍 General Feedback
- The dependency and test suite simplifications in
setup.py,tox.ini, and the Gradle build definitions are clean and consistent across the targeted Python versions. - One minor inconsistency exists in
tox.iniwhere the23factor is omitted fromenvlist, which will preventtoxfrom recognizingpy311-pytorch-23unless explicitly matched or added to the factor list.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
💬 Inline Findings
sdks/python/tox.ini(line 25): 🟡 Medium:envlistonly includeslatestfor thepytorchenvironments (py{311,314}-pytorch-{latest}), omitting23. While[testenv:py{311,314}-pytorch-{23,latest}]defines the23factor below, keeping23inenvlistensures consistency with other versioned test environments (likepyarrowandtransformers) and allowstoxenvironment enumeration to includepy311-pytorch-23.
py{311,314}-pytorch-{23,latest}
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR drops support for PyTorch 1.x by bumping the minimum requirement in sdks/python/setup.py to torch>=2.0.0,<3.0.0, removing obsolete PyTorch 1.x tox environments (pytorch-19, pytorch-110, pytorch-111, pytorch-112, pytorch-113), and updating the Gradle tox test suites (py311, py312, py314) and tox.ini to test PyTorch 2.0, 2.7, and 2.11 (pytorch-latest).
🔍 General Feedback
- The changes across
setup.py,tox.ini, and the Gradle build configurations are clean, consistent, and well-aligned with recent dependency modernization PRs. - The updated
PostCommit Python DependencyCI workflow passed on all target Python versions (3.11, 3.12, and 3.14).
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40710 +/- ##
==========================================
- Coverage 80.04% 79.92% -0.13%
==========================================
Files 490 493 +3
Lines 82916 83363 +447
==========================================
+ Hits 66373 66628 +255
- Misses 16543 16735 +192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Assigning reviewers: R: @tvalentyn for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
| toxTask "testPy311pytorch-200", "py311-pytorch-200", "${posargs}" | ||
| test.dependsOn "testPy311pytorch-200" | ||
| postCommitPyDep.dependsOn "testPy311pytorch-200" | ||
| // Create a test task for the lower and upper bounds of supported pytorch. |
There was a problem hiding this comment.
is pytorch-latest conceptually the same as pytorch-upper?
There was a problem hiding this comment.
if so, maybe we should rename it as such. 'latest' configuration sounds to me like "test against whatever pytorch is currently latest "
There was a problem hiding this comment.
renamed to follow the previous convention
Updates pytorch, with the floor set at 2.3.0 to allow for support with numpy 2+. Also updates test environments.