Skip to content

Fix evaluator task validation for text2text-generation, summarization, and translation#775

Open
zanvari wants to merge 1 commit into
huggingface:mainfrom
zanvari:fix-evaluator-text2text-task-validation
Open

Fix evaluator task validation for text2text-generation, summarization, and translation#775
zanvari wants to merge 1 commit into
huggingface:mainfrom
zanvari:fix-evaluator-text2text-task-validation

Conversation

@zanvari

@zanvari zanvari commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Fixes #741.

In recent releases of transformers, the pipeline task registry no longer exposes the text2text-generation, summarization, and translation task names, causing calls to evaluate.evaluator(...) to raise a KeyError even though these are supported evaluator tasks.

This change prioritizes SUPPORTED_EVALUATOR_TASKS before
consulting the Transformers pipeline task registry, preserving
support for these tasks.

Tests

Added a regression test verifying that:

  • evaluator("text2text-generation")
  • evaluator("summarization")
  • evaluator("translation")

all create the expected evaluator classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task Text Summarization does not work

1 participant