Make tensorflow optional in requirements - #5086
Conversation
There was a problem hiding this comment.
Code Review
This pull request deprecates the legacy TFDS input pipeline in favor of the Grain pipeline and makes TensorFlow-related packages optional dependencies. It introduces a new tf_requirements.txt file and updates the installation scripts and documentation to support an optional --with-tf flag. Additionally, various generated requirements files are updated with bumped dependency versions. The review feedback recommends removing capture_output=True from the subprocess installation command to prevent the CLI from appearing hung, and suggests adding seqio to the optional TensorFlow requirements since it is needed for the legacy pipeline.
254f7f5 to
a788357
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
a788357 to
88cfadb
Compare
88cfadb to
7730c67
Compare
50e25ab to
74728cd
Compare
74728cd to
03c6c09
Compare
Description
• requirements.txt: Removed tensorflow, tensorflow-datasets, tensorflow-text, and seqio.
• tpu_overrides.txt & cuda12_overrides.txt: Removed hardcoded TensorFlow pins.
• tf_requirements.txt: New dedicated file for optional TF packages.
• install_pre_train_extra_deps.py: Added --with-tf CLI flag and WITH_TF=true environment
variable support.
• tpu-requirements.txt, cuda12-requirements.txt, decoupled-requirements.txt.
b/555209521
Tests
Generated environments following this instruction for cases with or without TF. Confirmed it works as expected.
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.