fix: replace deprecated grouped_entities with aggregation_strategy across all languages#1198
Open
ddarji1409 wants to merge 1 commit intohuggingface:mainfrom
Open
fix: replace deprecated grouped_entities with aggregation_strategy across all languages#1198ddarji1409 wants to merge 1 commit intohuggingface:mainfrom
ddarji1409 wants to merge 1 commit intohuggingface:mainfrom
Conversation
The `grouped_entities=True` parameter was removed from `TokenClassificationPipeline`. Replace all occurrences across all language chapters and subtitles with the current equivalent: `aggregation_strategy="simple"`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
|
hi @ddarji1409, it looks good but the PR build is failing! Can you check the CI to see if a syntax error was introduced anywhere? |
khushali9
reviewed
Feb 23, 2026
| { | ||
| text: "Er gibt Begriffe zurück, die für Personen, Organisationen oder Orte stehen.", | ||
| explain: "Außerdem werden mit <code>grouped_entities=True</code> die Wörter, die zur selben Entität gehören, gruppiert, wie z. B. \"Hugging Face\".", | ||
| explain: "Außerdem werden mit <code>aggregation_strategy="simple"</code> die Wörter, die zur selben Entität gehören, gruppiert, wie z. B. \"Hugging Face\".", |
There was a problem hiding this comment.
Need to take care of " double quatation around word simple like how it is for Hugging Face.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #44016 (reported in huggingface/transformers).
The
grouped_entitiesparameter was removed fromTokenClassificationPipeline. Passing it now raises:The replacement is
aggregation_strategy="simple"which provides equivalent behavior.Changes
Replaced all occurrences of
grouped_entities=Truewithaggregation_strategy="simple"across:.mdxchapter files and.mdsubtitle files=, extra text in backticks, HTML<code>tags, glossary entriesTest
Running the updated notebook code no longer raises a
TypeErrorand the NER pipeline runs correctly.Related: huggingface/transformers#44016
🤖 Generated with Claude Code