Bump tested versions to TensorFlow 2.21.0 / Keras 3.14.0 - #464
Merged
Conversation
Update CI pin and the README's documented tested versions, and accept the renamed Threshold layer config keys (threshold_value -> threshold, value -> default_value) so models exported from Keras 3.14 load. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Also pin keras==3.14.0 explicitly so the perf-test image matches the versions pinned in CI rather than relying on whatever Keras the TensorFlow wheel happens to pull in. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TF 2.21's .bazelrc uses --enable_workspace, which requires Bazel 7+, so bump the pinned bazel from 6.5.0 to 7.7.0 (matches TF 2.21's .bazelversion). Also install xxd, which TF's XLA genrules now invoke during the build. Verified by running docker build of test/Dockerfile end-to-end: TF wheel builds, save_application_examples.py converts all Keras Application models, applications_performance loads and benchmarks them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
keras==3.14.0 requires Python >=3.11; the ubuntu-22.04 runner ships Python 3.10. Use ubuntu-24.04 (Python 3.12) so pip can resolve the pinned version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ubuntu 24.04 ships a PEP 668 externally-managed Python where system-wide pip installs are blocked unless the flag is set, even from a sudo shell. Required after the runner bump. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ubuntu 24.04 ships pip 24.0, which already handles the TF 2.21 and Keras 3.14 wheels. The self-upgrade step also runs into PEP 668's RECORD-file check on apt-installed pip, so removing it both simplifies setup and avoids that quirk. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Some apt-shipped Python packages on the ubuntu-24.04 runner (e.g. python3-typing-extensions) lack RECORD files, so pip refuses to uninstall them when a newer version is needed. Tell pip to overlay the requested versions without uninstalling, mirroring how other CI runners on PEP 668 systems handle this. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
thresholdanddefault_value) while still falling back to the old keys (threshold_valueandvalue) for models exported by older Keras versions.input_layersform, the existingreadme_example_maintest naturally regression-tests the fix from Fix loading of single-input/output models (closes #461) #463.Test plan
generate_test_models.pyruns cleanly for all five model variants (sequential, autoencoder, variable, embedding, exhaustive) against TF 2.21.0 / Keras 3.14.0.convert_model.pyround-trips each model.test_model_exhaustive_test,test_model_embedding_test,test_model_variable_test,test_model_autoencoder_test,test_model_sequential_test,readme_example_main).🤖 Generated with Claude Code