{
  "id": "tensorflow/savedmodel-signature-key-error",
  "signature": "ValueError: Signature key 'serving_default' not found in SavedModel. Available keys: ['train', 'eval']. Check the model export configuration.",
  "signature_zh": "ValueError: 在SavedModel中未找到签名键'serving_default'。可用键：['train', 'eval']。请检查模型导出配置。",
  "regex": "Signature key .* not found in SavedModel",
  "domain": "tensorflow",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The SavedModel was exported with only training and evaluation signatures, lacking the default serving signature required for inference.",
  "root_cause_type": "generic",
  "root_cause_zh": "SavedModel仅导出训练和评估签名，缺少推理所需的默认服务签名。",
  "versions": [
    {
      "version": "tensorflow==2.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow==2.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow==2.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reinstalling TensorFlow does not affect the SavedModel content; the issue is in the export process.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing the input data shape does not add missing signatures; it only affects the data passed to existing signatures.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Re-export the model with `tf.saved_model.save` and include a serving signature by specifying `signatures` parameter with a concrete function.",
      "success_rate": 0.95,
      "how": "Re-export the model with `tf.saved_model.save` and include a serving signature by specifying `signatures` parameter with a concrete function.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `model.save('model.h5')` to save in HDF5 format and then convert to SavedModel with the correct signatures using `tf.keras.models.load_model` and `tf.saved_model.save`.",
      "success_rate": 0.85,
      "how": "Use `model.save('model.h5')` to save in HDF5 format and then convert to SavedModel with the correct signatures using `tf.keras.models.load_model` and `tf.saved_model.save`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Re-export the model with `tf.saved_model.save` and include a serving signature by specifying `signatures` parameter with a concrete function.",
    "Use `model.save('model.h5')` to save in HDF5 format and then convert to SavedModel with the correct signatures using `tf.keras.models.load_model` and `tf.saved_model.save`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.tensorflow.org/guide/saved_model",
  "official_doc_section": null,
  "error_code": "SMSIG",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-08-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}