From c7c7091ea5c081332eb62dd02248b794ae92eab5 Mon Sep 17 00:00:00 2001 From: Fabien Hertschuh Date: Tue, 3 Jun 2025 11:04:31 -0700 Subject: [PATCH 1/2] Disallow pickle loading in npz files. PiperOrigin-RevId: 766740730 --- tf_keras/saving/saving_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tf_keras/saving/saving_lib.py b/tf_keras/saving/saving_lib.py index cc27530d8..7eb84416a 100644 --- a/tf_keras/saving/saving_lib.py +++ b/tf_keras/saving/saving_lib.py @@ -639,7 +639,7 @@ def __init__(self, root_path, archive=None, mode="r"): self.f = archive.open(root_path, mode="r") else: self.f = open(root_path, mode="rb") - self.contents = np.load(self.f, allow_pickle=True) + self.contents = np.load(self.f, allow_pickle=False) def make(self, path): if not path: From 9bcb1650a1b9a2fcfc63517ad39c8b5d24752a40 Mon Sep 17 00:00:00 2001 From: RaviTeja Gorijala Date: Tue, 8 Jul 2025 22:21:09 +0000 Subject: [PATCH 2/2] Update version to 2.19.1 --- tf_keras/__init__.py | 2 +- tf_keras/tools/pip_package/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tf_keras/__init__.py b/tf_keras/__init__.py index 8089f415f..6a0c9f604 100644 --- a/tf_keras/__init__.py +++ b/tf_keras/__init__.py @@ -35,6 +35,6 @@ from tensorflow.python import tf2 from tensorflow.python.util.tf_export import keras_export -__version__ = "2.19.0" +__version__ = "2.19.1" keras_export("keras.__version__").export_constant(__name__, "__version__") diff --git a/tf_keras/tools/pip_package/setup.py b/tf_keras/tools/pip_package/setup.py index ba45f86c0..876c17273 100644 --- a/tf_keras/tools/pip_package/setup.py +++ b/tf_keras/tools/pip_package/setup.py @@ -31,7 +31,7 @@ # This version string is semver compatible, but incompatible with pip. # For pip, we will remove all '-' characters from this string, and use the # result for pip. -_VERSION = "2.19.0" +_VERSION = "2.19.1" REQUIRED_PACKAGES = [ # We depend on TensorFlow's declared pip dependencies.