Skip to content

Commit c79cc0e

Browse files
hertschuhtensorflower-gardener
authored andcommitted
Disallow pickle loading in npz files.
PiperOrigin-RevId: 766740730
1 parent ff37bcc commit c79cc0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tf_keras/saving/saving_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def __init__(self, root_path, archive=None, mode="r"):
639639
self.f = archive.open(root_path, mode="r")
640640
else:
641641
self.f = open(root_path, mode="rb")
642-
self.contents = np.load(self.f, allow_pickle=True)
642+
self.contents = np.load(self.f, allow_pickle=False)
643643

644644
def make(self, path):
645645
if not path:

0 commit comments

Comments
 (0)