Repository navigation
Update TF.Text guide and tutorial notebooks for TensorFlow 2.20+ and Keras 3. - #1577
Merged
Merged
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
copybara-service
Bot
force-pushed
the
test_1009121307
branch
from
October 30, 2026 20:49
1f3c829 to
08692ad
Compare
…Keras 3. Several TF.Text guide and tutorial notebooks fail on current TensorFlow releases due to outdated package pins, legacy system package workarounds, and Keras 3 API changes. - Unpin legacy package versions, remove obsolete `apt` / `protobuf` workarounds and leftover empty setup cells, and replace `tensorflow-addons` metric usage in `bert_glue.ipynb` with `SparseCategoricalAccuracy`. - Enable legacy Keras (`TF_USE_LEGACY_KERAS=1`) and install `tf-keras` in notebooks that depend on Keras 2 APIs, TensorFlow Hub layers, or `tf-models-official`. - Update `tf.keras.utils.get_file` dataset path handling (`train_dir` and `dataset_dir`) to work with both Keras 2 and Keras 3 return values, and fix a `super().__init__()` call in `text_generation.ipynb`. PiperOrigin-RevId: 1010774895
copybara-service
Bot
force-pushed
the
test_1009121307
branch
from
October 30, 2026 20:59
08692ad to
3e74e03
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update TF.Text guide and tutorial notebooks for TensorFlow 2.20+ and Keras 3.
Several TF.Text guide and tutorial notebooks fail on current TensorFlow releases due to outdated package pins, legacy system package workarounds, and Keras 3 API changes.
apt/protobufworkarounds and leftover empty setup cells, and replacetensorflow-addonsmetric usage inbert_glue.ipynbwithSparseCategoricalAccuracy.TF_USE_LEGACY_KERAS=1) and installtf-kerasin notebooks that depend on Keras 2 APIs, TensorFlow Hub layers, ortf-models-official.tf.keras.utils.get_filedataset path handling (train_diranddataset_dir) to work with both Keras 2 and Keras 3 return values, and fix asuper().__init__()call intext_generation.ipynb.