# ValueError：任务 `summarization_v2` 不被 pipeline 支持。支持的任务有：['text-classification', 'token-classification', 'question-answering', 'summarization', 'translation', 'text-generation', 'zero-shot-classification', 'fill-mask']

- **ID:** `huggingface/pipeline-task-not-supported`
- **领域:** huggingface
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 95%

## 根因

pipeline 任务名称拼写错误或不在支持的任务列表中，通常是由于拼写错误或使用了过时的任务标识符。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| transformers>=4.20.0 | active | — | — |
| python>=3.7 | active | — | — |

## 解决方案

1. ```
   从支持列表中使用正确的任务名称。示例：pipe = pipeline('summarization', model='facebook/bart-large-cnn')
   ```
2. ```
   检查模型配置以获取正确任务：model.config.task_specific_params 或使用 AutoModelForSeq2SeqLM 进行摘要。
   ```

## 无效尝试

- **** — Pipeline tasks are predefined; custom tasks require subclassing and registering. (80% 失败率)
- **** — Task names must exactly match the supported list; 'text2text-generation' is not a valid pipeline task. (70% 失败率)
