Returns the input names and tensor specs associated with callable or None.
tfma.model_util.get_input_specs(
model: Any,
signature_name: Optional[Text] = None,
required: bool = True
) -> Optional[Dict[Text, tf.TypeSpec]]
Args |
model
|
A model that is callable or contains a signatures attribute. If
neither of these conditions are met, then None will be returned.
|
signature_name
|
Optional name of signature to use. If not provided then
either the default serving signature will be used (if model is not
callable) or the model itself will be used (if the model is callable). If
provided then model.signatures will be used regardless of whether the
model is callable or not.
|
required
|
True if signature_name is required to exist if provided.
|
Returns |
Dict mapping input names to their associated tensor specs or None if no
callable could be found.
|
Raises |
ValueError
|
If signature_name not found in model.signatures.
|