# ValueError: Could not find signature def corresponding to requested signature key 'serving_default'

- **ID:** `tensorflow/savedmodel-signature-def-not-found`
- **Domain:** tensorflow
- **Category:** config_error
- **Error Code:** `SSD`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

SavedModel was exported without a default serving signature or with a different signature name, causing model loading to fail when expecting 'serving_default'.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| tensorflow 2.11 | active | — | — |
| tensorflow 2.12 | active | — | — |
| tensorflow 2.13 | active | — | — |
| tensorflow 2.14 | active | — | — |

## Workarounds

1. **List available signatures in the SavedModel: import tensorflow as tf; loaded = tf.saved_model.load('model_dir'); print(list(loaded.signatures.keys())). Then use the correct key: model = tf.saved_model.load('model_dir', tags='serve', signature='your_correct_key')** (90% success)
   ```
   List available signatures in the SavedModel: import tensorflow as tf; loaded = tf.saved_model.load('model_dir'); print(list(loaded.signatures.keys())). Then use the correct key: model = tf.saved_model.load('model_dir', tags='serve', signature='your_correct_key')
   ```
2. **Re-export the model with an explicit serving signature: @tf.function(input_signature=[tf.TensorSpec(shape=[None, 224, 224, 3], dtype=tf.float32)]); def serving_fn(input): return self.call(input); tf.saved_model.save(model, 'model_dir', signatures={'serving_default': serving_fn})** (85% success)
   ```
   Re-export the model with an explicit serving signature: @tf.function(input_signature=[tf.TensorSpec(shape=[None, 224, 224, 3], dtype=tf.float32)]); def serving_fn(input): return self.call(input); tf.saved_model.save(model, 'model_dir', signatures={'serving_default': serving_fn})
   ```

## Dead Ends

- **Re-exporting the model with tf.saved_model.save without specifying signatures** — If the model's call method is not defined, default signature may still be missing; need to explicitly provide signatures. (60% fail)
- **Renaming the signature key in the loader to match a non-existent key** — The key must match an actual signature in the SavedModel; guessing keys rarely works. (90% fail)
