{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicfyzzqxchzyd4p3prxxmk5z7h5hav7yy3dmwjqbpirvjpqmflsq4",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3midvw6lvumk2"
  },
  "path": "/t/pipeline-tutorial-summarization-doesnt-work/174833#post_1",
  "publishedAt": "2026-03-31T09:35:36.000Z",
  "site": "https://discuss.huggingface.co",
  "tags": [
    "Transformers, what can they do? · Hugging Face",
    "Google Colab"
  ],
  "textContent": "I’m doing a HF tutorial on transformers at Transformers, what can they do? · Hugging Face. It uses a Colab notebook at Google Colab . When I try to run the code for a summarizer, which begins with this:\n\n\n    from transformers import pipeline\n\n    summarizer = pipeline(\"summarization\")\n\n\n\nI get an error\n\n\n     ---------------------------------------------------------------------------\n    KeyError                                  Traceback (most recent call last)\n    /tmp/ipykernel_13970/3730791013.py in <cell line: 0>()\n          1 from transformers import pipeline\n          2\n    ----> 3 summarizer = pipeline(\"summarization\")\n          4 summarizer(\n          5     \"\"\"\n\n    2 frames/usr/local/lib/python3.12/dist-packages/transformers/pipelines/__init__.py in pipeline(task, model, config, tokenizer, feature_extractor, image_processor, processor, revision, use_fast, token, device, device_map, dtype, trust_remote_code, model_kwargs, pipeline_class, **kwargs)\n        775             )\n        776     else:\n    --> 777         normalized_task, targeted_task, task_options = check_task(task)\n        778         if pipeline_class is None:\n        779             pipeline_class = targeted_task[\"impl\"]\n\n    /usr/local/lib/python3.12/dist-packages/transformers/pipelines/__init__.py in check_task(task)\n        379\n        380     \"\"\"\n    --> 381     return PIPELINE_REGISTRY.check_task(task)\n        382\n        383\n\n    /usr/local/lib/python3.12/dist-packages/transformers/pipelines/base.py in check_task(self, task)\n       1354             raise KeyError(f\"Invalid translation task {task}, use 'translation_XX_to_YY' format\")\n       1355\n    -> 1356         raise KeyError(\n       1357             f\"Unknown task {task}, available tasks are {self.get_supported_tasks() + ['translation_XX_to_YY']}\"\n       1358         )\n\n    KeyError: \"Unknown task summarization, available tasks are ['any-to-any', 'audio-classification', 'automatic-speech-recognition', 'depth-estimation', 'document-question-answering', 'feature-extraction', 'fill-mask', 'image-classification', 'image-feature-extraction', 'image-segmentation', 'image-text-to-text', 'image-to-image', 'keypoint-matching', 'mask-generation', 'ner', 'object-detection', 'question-answering', 'sentiment-analysis', 'table-question-answering', 'text-classification', 'text-generation', 'text-to-audio', 'text-to-speech', 'token-classification', 'video-classification', 'visual-question-answering', 'vqa', 'zero-shot-audio-classification', 'zero-shot-classification', 'zero-shot-image-classification', 'zero-shot-object-detection', 'translation_XX_to_YY']\"\n\n\nThe pipeline no longer supports “summarization”. Is there a way to get this to work. I’m mainly curious. It appears the pipeline module may have been updated but the Colab notebook was not.\n\nThanks!",
  "title": "Pipeline tutorial, summarization doesn't work"
}