label-studio-ml-backend icon indicating copy to clipboard operation
label-studio-ml-backend copied to clipboard

Workaround to avoid duplicate annotations

Open cgrtrifork opened this issue 6 months ago • 1 comments

https://github.com/HumanSignal/label-studio/issues/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.

cgrtrifork avatar Sep 04 '24 12:09 cgrtrifork