huggingface / huggingface/course

pipeline("translation", model="Helsinki-NLP/opus-mt-fr-en") raises KeyError

Open Beginner friendly
#1,284 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
4.2k
Forks
1.4k
Avg merge
13m
Merged PRs (30d)
1

Description

In (1.) Transformer models - chapter 3, the example code in translation part:
`translator = pipeline("translation", model="Helsinki-NLP/opus-mt-fr-en")` it gives **KeyError**: "Unknown task translation, available tasks are.... For Hugging Face transformers version 5.0+, the core translation pipeline is no longer included by default in the standard pipeline() registry.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in (1.) Transformer models, chapter 3, at the translation example containing pipeline("translation", model="Helsinki-NLP/opus-mt-fr-en"). Check the current Transformers pipeline documentation and reproduce the KeyError with the documented version context. Done means the course example no longer presents a failing translation setup and the updated instructions are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.