GLiNER detection fails when response text contains HTML comments
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start with the reproducer for TextResponseRecipe in data_designer.engine.models.recipes.response_recipes and trace the reported path through response_recipes.py and parser.py's lookup_parser. Run the synthetic GLiNER-style response with an HTML comment; done means detector responses preserve that entity text without the reported parsing failure.
Written by the indexing model from the issue text.
Description
Priority Level
Medium (Annoying but has workaround)
Describe the bug
During ATIF scrubbing, _raw_detected_entities fails with:
Non-retryable failure on _raw_detected_entities[rg=0, row=32]:
sequence item 3: expected str instance, _cython_3_2_9.cython_function_or_method found
We reproduced the exact exception locally with a synthetic GLiNER-style JSON response containing an HTML comment. The original failing response from the Spark run has not been captured, so that specific trigger remains unconfirmed.
Steps/Code to reproduce bug
from data_designer.engine.models.recipes.response_recipes import TextResponseRecipe
TextResponseRecipe().parse('{"entities": [{"text": "<!-- Alice -->"}]}')
Relevant traceback:
response_recipes.py:49, in <lambda>
return lambda x: parser.parse(x).response
parser.py:221, in parse
parsed_block = self.lookup_parser(element)(element)
parser.py:161, in lookup_parser
tag_path = ".".join(lineage)
TypeError: sequence item 3: expected str instance, _cython_3_2_9.cython_function_or_method found
Expected behavior
Detector responses should preserve entity text containing HTML comments without failing.
Additional context
Locally reproduced with:
- NeMo Anonymizer 0.4.0
- Data Designer Engine 0.9.3
- lxml 6.1.3
Anonymizer defines _raw_detected_entities as an LLMTextColumnConfig, which uses Data Designer's TextResponseRecipe. That recipe parses the response as Markdown/HTML even though it ultimately returns the original response. An lxml comment node has a function-valued .tag, causing the string join to fail.
Could the text recipe pass the raw response through without HTML parsing, or could the detector path bypass that parsing? This appears to originate in the Data Designer dependency, but surfaces during Anonymizer detection.
- Dominant language
- Python
- Stars
- 133
- Forks
- 22
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA-NeMo/Anonymizer
-
Use context to recognize personal initials and lowercase namesPossibly taken @lipikaramaswamy claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
NVIDIA-NeMo/Anonymizer#340 ·
Maintainers usually reply within 1 day
-
Clarify date validation for months, years, and partial datesPossibly taken @lipikaramaswamy claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA-NeMo/Anonymizer#334 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA-NeMo/Anonymizer#327 ·
Maintainers usually reply within 1 day
-
Replacement-map generation can silently omit a requested entity, causing the rewrite to be marked unavailablePossibly taken @dundysm claimed this 40 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA-NeMo/Anonymizer#278 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA-NeMo/Anonymizer#6 · 1 comment ·
Maintainers usually reply within 1 day
All issues in NVIDIA-NeMo/Anonymizer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Nixtla/mlforecast#823 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
Difficulty 2/5 Under an hour Newbie friendliness 82/100
madenvel/KalinkaPlayer#503 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
EleutherAI/lm-evaluation-harness#4508 ·
Maintainers usually reply within 1 day