Skip to content

Summarization/Translation docs still reference pipeline() after v5 pipeline removals #43827

@math-hiyoko

Description

@math-hiyoko

System Info

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

  • transformers version: 5.2.0.dev0
  • Platform: Linux-6.6.105+-x86_64-with-glibc2.35
  • Python version: 3.12.12
  • Huggingface_hub version: 1.3.7
  • Safetensors version: 0.7.0
  • Accelerate version: 1.12.0
  • Accelerate config: not found
  • DeepSpeed version: not installed
  • PyTorch version (accelerator?): 2.9.0+cpu (NA)
  • Using distributed or parallel set-up in script?: parallel set-up

Who can help?

@stevhliu

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

According to the Transformers v5 migration guide, SummarizationPipeline and TranslationPipeline were removed in v5:

https://github.com/huggingface/transformers/blob/main/MIGRATION_GUIDE_V5.md#pipelines

However, the official task documentation for summarization and translation still contains inference examples using transformers.pipeline().
https://huggingface.co/docs/transformers/en/tasks/summarization#inference
https://huggingface.co/docs/transformers/en/tasks/translation#inference

This is confusing for users on v5, because the shown examples no longer work as written (or suggest that the pipeline API is still supported for these tasks).

Expected behavior

Remove pipeline()-based examples for summarization/translation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions