Skip to content

Commit 7b4f4d9

Browse files
committed
add edits, incorporate feedback from RFC comments
1 parent 491b9c0 commit 7b4f4d9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

rfcs/20220610-saved-model-fingerprinting.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Objective
1111

12-
Following the convention of other types of electronic files and artifacts, the SavedModel format would benefit from having a fingerprint that uniquely identify the program it serializes. This fingerprint will better enable users to track their SavedModels in ML pipelines and other infrastructure using native metadata.
12+
Following the convention of other types of electronic files and artifacts, the SavedModel format would benefit from having a fingerprint that uniquely identify the program it serializes.
1313

1414
## Motivation
1515

@@ -201,7 +201,7 @@ We can also explore the option of adding a Python API such as `tf.saved_model.ch
201201

202202
The fingerprinting will be added as a final step of serialization. The fingerprint infrastructure will take as input the MetaGraphDef and hash each component of it, doing the necessary regularization as well.
203203

204-
The hashing will occur in C++, since it is easier to find an open source hashing algorithm in C++ than in Python. Hashing in C++ is also much faster. There will be pybinded wrappers for access from Python. This will require passing the protobuf across the Python and C++ boundary which may require an extra cycle of de/serialization.
204+
The hashing will occur in C++, since it is easier to find an open source hashing algorithm in C++ than in Python. There will be pybinded wrappers for access from Python. This will require passing the protobuf across the Python and C++ boundary which may require an extra cycle of de/serialization.
205205

206206
### Launch Plan
207207

@@ -247,6 +247,13 @@ When creating the SavedModel proto, we’d collect the fingerprints of each of t
247247

248248
The disadvantage of this approach is that it is primarily in Python and works with the objects as defined in Python. Working in C++ is preferable to working in Python.
249249

250+
#### Text Format Proto
251+
252+
One idea is have the fingerprint be in [text format](https://developers.google.com/protocol-buffers/docs/text-format-spec) so it
253+
can be human-readable. However, the disadvantage is that using text format prevents us from making changes to the fields in the
254+
fingerprint protobuf. Text format is not designed with the same forward- and backward-compatibility properties as the binary format, so
255+
we avoid using it with production infrastructure.
256+
250257
### Future Ideas
251258

252259
#### Changes to the CLI

0 commit comments

Comments
 (0)