Skip to content

Bump tested versions to TensorFlow 2.21.0 / Keras 3.14.0 - #464

Merged
Dobiasd merged 7 commits into
masterfrom
bump-tf-keras-versions
Apr 29, 2026
Merged

Bump tested versions to TensorFlow 2.21.0 / Keras 3.14.0#464
Dobiasd merged 7 commits into
masterfrom
bump-tf-keras-versions

Conversation

@Dobiasd

@Dobiasd Dobiasd commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump CI pin from TF 2.18.0 / Keras 3.8.0 to TF 2.21.0 / Keras 3.14.0, and update the README's documented tested versions to match.
  • Accept the new Threshold layer config keys Keras 3.14 emits (threshold and default_value) while still falling back to the old keys (threshold_value and value) for models exported by older Keras versions.
  • Now that CI runs against a Keras version that emits the flat single-input input_layers form, the existing readme_example_main test naturally regression-tests the fix from Fix loading of single-input/output models (closes #461) #463.

Test plan

  • generate_test_models.py runs cleanly for all five model variants (sequential, autoencoder, variable, embedding, exhaustive) against TF 2.21.0 / Keras 3.14.0.
  • convert_model.py round-trips each model.
  • All six C++ unit tests pass locally (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

Dobiasd and others added 7 commits April 29, 2026 07:26
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>
@Dobiasd
Dobiasd merged commit 3121339 into master Apr 29, 2026
4 checks passed
@Dobiasd
Dobiasd deleted the bump-tf-keras-versions branch April 29, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant