Repository navigation
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR resolves dependency conflicts in the legacy py311-tensorflow-212 and py312-tensorflow-216 tox environments by replacing the gcp extra with test only, constraining package dependencies during SDK installation (constrain_package_deps and use_frozen_constraints), and pinning protobuf==4.25.5, setuptools<82, and tensorflow-hub directly in deps.
🔍 General Feedback
- Moving
protobuf==4.25.5fromcommands_preintodepscombined withconstrain_package_deps = Trueanduse_frozen_constraints = Trueis a much cleaner approach that ensurespip checkpasses during environment setup. - Explicitly adding
tensorflow-hubandsetuptools<82(forpkg_resourcescompatibility) aligns well with the other ML test environments intox.iniand ensures the TensorFlow inference test suite is actually executed rather than skipped.
💡 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 #40771 +/- ##
==========================================
- Coverage 80.04% 79.90% -0.15%
==========================================
Files 490 493 +3
Lines 82916 83473 +557
==========================================
+ Hits 66373 66700 +327
- Misses 16543 16773 +230
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: @shunping 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). |
Related #30799.
The legacy TensorFlow environments install the GCP extra and then force protobuf back to 4.25.5. Current GCP dependencies require protobuf 6, so that leaves an inconsistent environment and causes import failures during test collection.
Keep these compatibility environments on the test extra and constrain later package installation to the resolved TensorFlow dependencies. Install TensorFlow Hub explicitly so the inference tests run rather than skipping the module. Cloud coverage remains in the cloud environments.
Validated dependency resolution,
pip check, full test collection, and the TensorFlow inference suite for both environments with tox's dependency-only packaging mode. This exercises the source checkout without rebuilding the native SDK wheel. The environments can be run withtox -e py311-tensorflow-212,py312-tensorflow-216.