-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: DIA-1637: Check object tag compatibility for NER tags #275
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #275 +/- ##
==========================================
- Coverage 68.02% 67.98% -0.05%
==========================================
Files 47 47
Lines 2508 2511 +3
==========================================
+ Hits 1706 1707 +1
- Misses 802 804 +2 ☔ View full report in Codecov by Sentry. |
@@ -53,7 +53,11 @@ def ner_tags(self) -> List[ControlTag]: | |||
for tag_name in control_tag_names: | |||
tag = self.label_interface.get_control(tag_name) | |||
if tag.tag.lower() in {"labels", "hypertextlabels"}: | |||
tags.append(tag) | |||
if self.allowed_object_tags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to remember why we don't just always pass allowed_object_tags... do we have a good reason that this shouldn't always just be set, or have we kinda just stumbled into having to support both of these cases?
(I know we're not gonna fix it as part of this PR if that's the case, just want to make sure I understand here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the reason I guess. I dont know the actual details of how passing it would drop information, since we only save filtered field_schema and keep the entire label_config anyway
We are filtering in LabelStudioSkill.validate_response_model based on
allowed_control_tags
andallowed_object_tags
but not overwritingself.label_config
based on this - onlyself.field_schema
Now checking to make sure any
Labels
tag points to a compatible object tag