{
  "id": "tensorflow/savedmodel-tagset-mismatch",
  "signature": "InvalidArgumentError: The SavedModel's tag set is empty or does not match the requested tags",
  "signature_zh": "InvalidArgumentError: SavedModel 的标签集为空或与请求的标签不匹配",
  "regex": "InvalidArgumentError: The SavedModel's tag set is empty or does not match the requested tags",
  "domain": "tensorflow",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "When loading a SavedModel with tf.saved_model.load(), the 'tags' argument does not match any MetaGraphDef present in the SavedModel, or the SavedModel was saved without tags.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用 tf.saved_model.load() 加载 SavedModel 时，‘tags’ 参数与 SavedModel 中存在的任何 MetaGraphDef 不匹配，或者 SavedModel 保存时未指定标签。",
  "versions": [
    {
      "version": "tensorflow 2.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow 2.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "tensorflow 2.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is tag-specific, not path-related; another SavedModel may have the same tag mismatch.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Debug info is unrelated to MetaGraphDef tags; the tag set remains unchanged.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use saved_model_cli show --dir /path/to/saved_model --all to list available tag sets, then pass the correct tags to tf.saved_model.load(). For example: model = tf.saved_model.load('/path/to/saved_model', tags=['serve'])",
      "success_rate": 0.95,
      "how": "Use saved_model_cli show --dir /path/to/saved_model --all to list available tag sets, then pass the correct tags to tf.saved_model.load(). For example: model = tf.saved_model.load('/path/to/saved_model', tags=['serve'])",
      "condition": "",
      "sources": []
    },
    {
      "action": "If no tags were saved, reload using tf.saved_model.load(path, tags=[]) or save the model again with explicit tags using tf.saved_model.save(model, path, signatures=..., tags=['serve']).",
      "success_rate": 0.9,
      "how": "If no tags were saved, reload using tf.saved_model.load(path, tags=[]) or save the model again with explicit tags using tf.saved_model.save(model, path, signatures=..., tags=['serve']).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 saved_model_cli show --dir /path/to/saved_model --all 列出可用的标签集，然后将正确的标签传递给 tf.saved_model.load()。例如：model = tf.saved_model.load('/path/to/saved_model', tags=['serve'])",
    "如果未保存任何标签，请使用 tf.saved_model.load(path, tags=[]) 重新加载，或者使用显式标签重新保存模型：tf.saved_model.save(model, path, signatures=..., tags=['serve'])。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.tensorflow.org/guide/saved_model#specifying_tags_when_loading",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2023-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}