Skip to content

feat: ROOT-45: Filter by annotator together with annotation results #7783

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

Merged
merged 87 commits into from
Aug 8, 2025

Conversation

matt-bernstein
Copy link
Contributor

@matt-bernstein matt-bernstein commented Jun 17, 2025

This PR was automatically generated via Follow Merge. Workflow Run
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.

image

Allow filters in DM to have a child_filter which is only available after the parent is selected. Use this new capability to add annotator as a child_filter to annotation_results. In this example, filters are now expressive enough to search for tasks with an annotation with label "PER" created by annotator "matt". Previously, a false positive would be returned if a task had both an annotation with label "PER" and a (potentially different) annotation by annotator "matt".

FE changes

  • give filters a child_filter and handle conditional CRUD logic (ensure a child never exists without its parent, and that incomplete filters are never sent to the BE)
  • styling to join parent and child filters into a visually distinct "filter line"

BE changes

  • let the Filter model have a recursive "children" field
  • expose children in serializers, limiting to at most 1 child and 1 level of nesting
  • ensure "filter lines" are always AND-ed when applying them to the tasks queryset, no matter what the FilterGroup's outer conjunction is

LSE changes

  • the annotator child_filter
  • tests

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@matt-bernstein matt-bernstein requested review from a team as code owners June 17, 2025 18:30
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 13888f8
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/6895e92c51b11e0007dbfa8d

Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 13888f8
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/6895e92cd9521100084e19f4

Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 13888f8
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/6895e92c8a12470008f8a37e

@github-actions github-actions bot added the feat label Jun 17, 2025
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for label-studio-playground canceled.

Name Link
🔨 Latest commit 13888f8
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/6895e92c3550c70008b104c8

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
This reverts commit 21be28f.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
Copy link

codecov bot commented Jun 17, 2025

Codecov Report

❌ Patch coverage is 78.18182% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.51%. Comparing base (0af526f) to head (775990e).
⚠️ Report is 2 commits behind head on develop.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
label_studio/data_manager/managers.py 72.80% 31 Missing ⚠️
label_studio/data_manager/serializers.py 88.88% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7783   +/-   ##
========================================
  Coverage    70.50%   70.51%           
========================================
  Files          719      719           
  Lines        51391    51433   +42     
  Branches      8736     8736           
========================================
+ Hits         36235    36269   +34     
- Misses       15153    15161    +8     
  Partials         3        3           
Flag Coverage Δ
lsf-e2e 59.76% <ø> (-0.01%) ⬇️
lsf-integration 55.42% <ø> (+0.03%) ⬆️
lsf-unit 9.52% <ø> (ø)
pytests 78.89% <78.18%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
ff

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Jun 18, 2025

/fmt

Workflow run

matt-bernstein and others added 5 commits August 4, 2025 14:06

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
…ular can understand its fields
@jombooth jombooth changed the title feat: ROOT-45: Filter by annotator prototype feat: ROOT-45: Filter by annotator together with annotation results Aug 4, 2025

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@jombooth
Copy link
Contributor

jombooth commented Aug 5, 2025

/git merge develop

Workflow run
Successfully merged: 9 files changed, 10 insertions(+), 18 deletions(-)

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Aug 7, 2025

/git merge develop

Workflow run
Successfully merged: 3 files changed, 350 insertions(+), 353 deletions(-)

Copy link
Contributor

@jombooth jombooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, awesome!

Copy link
Contributor

@yyassi-heartex yyassi-heartex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Aug 7, 2025

/git merge develop

Workflow run
Successfully merged: Already up to date.

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Aug 7, 2025

/fm sync

Workflow run

@matt-bernstein
Copy link
Contributor Author

matt-bernstein commented Aug 7, 2025

/git merge develop

Workflow run
Successfully merged: Already up to date.

matt-bernstein and others added 2 commits August 7, 2025 16:51

Unverified

This user has not yet uploaded their public signing key.
@robot-ci-heartex robot-ci-heartex merged commit e65787a into develop Aug 8, 2025
@robot-ci-heartex robot-ci-heartex deleted the fb-ROOT-45 branch August 8, 2025 12:10
hlomzik pushed a commit that referenced this pull request Aug 13, 2025
…7783)

Co-authored-by: matt-bernstein <[email protected]>
Co-authored-by: Jo Booth <[email protected]>
Co-authored-by: Ricardo Cabral <[email protected]>
Co-authored-by: robot-ci-heartex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants