HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
18.31k stars 2.3k forks source link

Incompatibility between alias and maxUsages together in a label definition #4148

Open spagliarini opened 1 year ago

spagliarini commented 1 year ago

Describe the bug When using both the attribute alias and maxUsages in a label, maxUsages is not effective.

To Reproduce Try to modify the playground example here as follows:

<View>
  <Labels name="type" toName="txt-1">
    <Label value="Brand" maxUsages="1"/>
    <Label alias="P" value="Product" maxUsages="1" />
  </Labels>
  <Text name="txt-1" value="$text" />
</View>

Then try to annotate twice both the label "Brand" and the label "Product". The first action won't be allowed, while I could select as many times as I wanted the label "Product".

Expected behavior The attribute maxUsage to be effective also when using the attribute alias.

Screenshots image

Environment (please complete the following information):

AbubakarSaad commented 1 year ago

Hello Spagliarini,

Thank you for reporting this. I'll create a ticket for this and will let you know.