Skip to content
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

Workaround to avoid duplicate annotations #618

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cgrtrifork
Copy link

@cgrtrifork cgrtrifork commented Sep 4, 2024

HumanSignal/label-studio#6312 causes an extra call to predict when 'Submit' is clicked, causing duplicate predictions. This is a workaround that shouldn't impact the functionality (handling an edge case that shouldn't happen anyway) and will prevent the problem by returning empty annotations the second time (when the prompt is duplicated).

This assumes the auto-annotation has been used before clicking submit. If it weren't used then the prompt length would be 1 and this fix wouldn't work. As stated, this is a workaround, the real fix should be to avoid LabelStudio calling the prediction endpoint on submit.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.97%. Comparing base (38974da) to head (73fc1f2).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #618      +/-   ##
==========================================
- Coverage   49.13%   46.97%   -2.17%     
==========================================
  Files          41       11      -30     
  Lines        2825      611    -2214     
==========================================
- Hits         1388      287    -1101     
+ Misses       1437      324    -1113     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants