From c2745de6957c323e9a91ba1d1edbaf369d3d4c8e Mon Sep 17 00:00:00 2001 From: Monica Song Date: Tue, 29 Nov 2022 23:57:32 +0000 Subject: [PATCH 1/2] add public API --- rfcs/20220610-saved-model-fingerprinting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/20220610-saved-model-fingerprinting.md b/rfcs/20220610-saved-model-fingerprinting.md index 1731ae21d..b5a35659a 100644 --- a/rfcs/20220610-saved-model-fingerprinting.md +++ b/rfcs/20220610-saved-model-fingerprinting.md @@ -184,7 +184,7 @@ One drawback of having a separate file is that it is a potentially significant c All fingerprints will be written to disk automatically, and there is no way to bypass or customize writing fingerprints when serializing a SavedModel. -To read the fingerprint, users can load the protobuf into memory and read the field. At first, there will not be dedicated APIs in Python to get the fingerprint, since no other part of the SavedModel has special APIs to access its value. However, if the need arises, we can add APIs under the `tf.saved_model` namespace to read the fingerprint. +There will be a public API in python `tf.saved_model.read_fingerprint(filepath)` which returns a dictionary mapping the names of the fields in the protobuf (i.e. "saved_model_checksum", "graph_def_program_hash", "signature_def_hash", "saved_object_graph_hash", "checkpoint_hash", "version") to their values. ### Validation From db4a677e0b2d4b809bff2a3533ecd0ba1798325d Mon Sep 17 00:00:00 2001 From: Monica Song Date: Wed, 30 Nov 2022 23:18:40 +0000 Subject: [PATCH 2/2] change arg name --- rfcs/20220610-saved-model-fingerprinting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/20220610-saved-model-fingerprinting.md b/rfcs/20220610-saved-model-fingerprinting.md index b5a35659a..ddfe56ecb 100644 --- a/rfcs/20220610-saved-model-fingerprinting.md +++ b/rfcs/20220610-saved-model-fingerprinting.md @@ -184,7 +184,7 @@ One drawback of having a separate file is that it is a potentially significant c All fingerprints will be written to disk automatically, and there is no way to bypass or customize writing fingerprints when serializing a SavedModel. -There will be a public API in python `tf.saved_model.read_fingerprint(filepath)` which returns a dictionary mapping the names of the fields in the protobuf (i.e. "saved_model_checksum", "graph_def_program_hash", "signature_def_hash", "saved_object_graph_hash", "checkpoint_hash", "version") to their values. +There will be a public API in python `tf.saved_model.read_fingerprint(export_dir)` which returns a dictionary mapping the names of the fields in the protobuf (i.e. "saved_model_checksum", "graph_def_program_hash", "signature_def_hash", "saved_object_graph_hash", "checkpoint_hash", "version") to their values. ### Validation