You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
obm: Match TF input/output signature argument names.
During serving the argument names in TF SavedModel SignatureDef must match the argument names saved in TfConcreteFunctionHandle. Previously this was achieved by renaming the flattened input/argument names to `input_{i}` and `output_{i}`.
This change aims to use the same argument names as TF SavedModel, because some tooling may expect the names in the signature definition to match the original argument names.
The input names are generally derived from the original argument function argument names and/or tensor names in the input signature, potentially mangled internally by TF. We source them from the saved function definition.
The output names match TF's naming scheme:
- `output_{i}` for lists, tuples and scalar return values;
- `{key}` for dictionaries (including registered dataclasses that can be flattened to a dictionary).
In addition we support nested data structures as TF function outputs. Normally these are not supported by TF but since we flatten the function outputs we have to support nested output shapes (for backward compatibility). Nested outputs naming follows a simple dot-separated key path derived from JAX tree flattening on the original output signature.
PiperOrigin-RevId: 834443321
0 commit comments