{
  "id": "huggingface/pipeline-invalid-task",
  "signature": "ValueError: The task `summarization_v2` is not supported by the pipeline. Supported tasks are: ['text-classification', 'token-classification', 'question-answering', 'summarization', 'translation', 'text-generation', 'zero-shot-classification', 'fill-mask', 'ner', 'sentiment-analysis']",
  "signature_zh": "ValueError: 任务 `summarization_v2` 不被 pipeline 支持。支持的任务有：['text-classification', 'token-classification', 'question-answering', 'summarization', 'translation', 'text-generation', 'zero-shot-classification', 'fill-mask', 'ner', 'sentiment-analysis']",
  "regex": "ValueError: The task `[^`]+` is not supported by the pipeline\\. Supported tasks are: \\[.*\\]",
  "domain": "huggingface",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The pipeline API was called with a task identifier that does not match any registered pipeline task, often due to typos or using a non-standard task name.",
  "root_cause_type": "generic",
  "root_cause_zh": "pipeline API 被调用时使用了未注册的任务标识符，通常是由于拼写错误或使用了非标准任务名称。",
  "versions": [
    {
      "version": "transformers>=4.25.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "huggingface-hub>=0.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Installing an older version of transformers (e.g., 4.20.0) to bypass the error",
      "why_fails": "Older versions have even fewer supported tasks; the invalid task will still fail.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Creating a custom pipeline with the same name without registering it",
      "why_fails": "The pipeline registry is static; custom tasks must be registered via `PipelineRegistry` or by using a valid alias.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Changing the model name in the pipeline call",
      "why_fails": "The error is about the task argument, not the model; changing the model does not affect task validation.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Correct the task name to a valid one: `from transformers import pipeline; pipe = pipeline('summarization', model='facebook/bart-large-cnn')`",
      "success_rate": 0.95,
      "how": "Correct the task name to a valid one: `from transformers import pipeline; pipe = pipeline('summarization', model='facebook/bart-large-cnn')`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the model's default task by omitting the task argument: `pipe = pipeline(model='facebook/bart-large-cnn')` which auto-detects the task.",
      "success_rate": 0.9,
      "how": "Use the model's default task by omitting the task argument: `pipe = pipeline(model='facebook/bart-large-cnn')` which auto-detects the task.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the task is truly custom, register it with `from transformers.pipelines import SUPPORTED_TASKS; SUPPORTED_TASKS['custom_task'] = {...}`",
      "success_rate": 0.7,
      "how": "If the task is truly custom, register it with `from transformers.pipelines import SUPPORTED_TASKS; SUPPORTED_TASKS['custom_task'] = {...}`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Correct the task name to a valid one: `from transformers import pipeline; pipe = pipeline('summarization', model='facebook/bart-large-cnn')`",
    "Use the model's default task by omitting the task argument: `pipe = pipeline(model='facebook/bart-large-cnn')` which auto-detects the task.",
    "If the task is truly custom, register it with `from transformers.pipelines import SUPPORTED_TASKS; SUPPORTED_TASKS['custom_task'] = {...}`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://huggingface.co/docs/transformers/en/main_classes/pipelines#transformers.pipeline.task",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-03-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}