Relax TensorFlow constraints and update text#2630
Relax TensorFlow constraints and update text#2630pctablet505 wants to merge 1 commit intokeras-team:masterfrom
Conversation
Remove strict ~=2.19 pins for tensorflow/tensorflow-cpu (and for tensorflow[and-cuda]) and replace tensorflow-text~=2.19 with tensorflow-text>=2.20.1. Applied to requirements-jax-cuda.txt, requirements-tensorflow-cuda.txt, requirements-torch-cuda.txt, and requirements.txt to allow newer TF releases and ensure tensorflow-text compatibility; platform-specific markers and PyTorch index URLs are preserved.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modifies the dependency constraints for TensorFlow and TensorFlow-text in several requirements files. It removes the strict version pinning for TensorFlow and updates the tensorflow-text dependency to a minimum version of 2.20.1 to avoid a known issue. This change allows for greater flexibility in TensorFlow versions and ensures compatibility with the specified tensorflow-text version. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the TensorFlow and TensorFlow-text dependencies across several requirement files. The update to tensorflow-text is well-justified by the need to avoid a broken version. However, completely removing the version pins for TensorFlow, while intended to relax constraints, introduces a significant risk of future build failures and unexpected behavior when new, incompatible versions are released. My feedback focuses on mitigating this risk by suggesting the use of minimum version specifiers. This approach maintains a baseline of compatibility while still allowing the use of newer TensorFlow releases, striking a balance between flexibility and stability.
Note: Security Review has been skipped due to the limited scope of the PR.
| # Tensorflow cpu-only version. | ||
| tensorflow-cpu~=2.19 | ||
| tensorflow-text~=2.19 | ||
| tensorflow-cpu |
There was a problem hiding this comment.
tf-text>=2.20.1 automatically ensures minimum version of tensorflow >=2.20
This pull request updates the TensorFlow and TensorFlow Text dependencies in the requirements files for JAX, Torch, and TensorFlow CUDA environments. The main goal is to ensure compatibility with newer versions of TensorFlow Text and to remove version pinning from TensorFlow packages.
Dependency updates:
tensorflow-cpuandtensorflow[and-cuda]to remove the version pin (~=2.19), allowing installation of the latest compatible versions. (requirements-jax-cuda.txt,requirements-tensorflow-cuda.txt,requirements-torch-cuda.txt) [1] [2] [3]tensorflow-textto2.20.1to ensure compatibility with newer TensorFlow versions. (requirements-jax-cuda.txt,requirements-tensorflow-cuda.txt,requirements-torch-cuda.txt) [1] [2] [3]Description of the change
tf-text>=2.20.1 required as 2.20 has broken tokenizer which we can't use.