fix: replace deprecated grouped_entities with aggregation_strategy#1194
fix: replace deprecated grouped_entities with aggregation_strategy#1194tysoncung wants to merge 4 commits intohuggingface:mainfrom
Conversation
The grouped_entities parameter was removed from TokenClassificationPipeline. Replace all occurrences across all language translations with the modern aggregation_strategy="simple" parameter which provides the same behavior. Fixes huggingface/transformers#44016
|
Hi @tysoncung, looks good but there are some build failures - can you check them in the CI? It's possible there's a typo somewhere that creates a syntax error, which blocks us from successfully building the docs |
The double quotes in aggregation_strategy="simple" inside <code> tags cause Svelte parse errors during the documentation build. Escape them as " to fix the build.
Replace backtick code formatting with <code> tags in Burmese chapter1/7.mdx quiz component to fix Svelte parser error during documentation build. Matches the pattern used in English and Telugu translations.
| { | ||
| 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.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
Closing - CI infra issue on repo side. Happy to reopen if needed. |
|
Thanks @khushali9 for the review! The |
|
Friendly bump — this PR is in a clean merge state with CI passing. Would love to get this merged when you have a moment! 🙏 |
Summary
Replace all occurrences of the deprecated
grouped_entities=Trueparameter with the modernaggregation_strategy="simple"across all language translations in chapter 1.Problem
The
grouped_entitiesparameter was removed fromTokenClassificationPipeline._sanitize_parameters(), causing aTypeErrorwhen running the NER pipeline examples in the course notebooks.Reported in huggingface/transformers#44016.
Changes
Testing
cc @Rocketknight1 (per your comment on the issue)