HumanSignal / label-studio-sdk

Label Studio SDK
https://api.labelstud.io
77 stars 50 forks source link

fix: DIA-1123: Handle config with invalid Label tag (no value) #213

Closed hakan458 closed 1 month ago

hakan458 commented 1 month ago

Builds on a fix made yesterday - https://github.com/HumanSignal/label-studio-sdk/pull/212

That handled the case where a value of a Label was an empty string. However in prod it seems we have some projects that dont have a value at all - which should be invalid and not pass validation - but somehow they exist.

Now this change will handle configs like this to not break, we will just be skipping this label for now and not raising an error. Might want to in the future.

<View>
  <Text name="text" value="$text"/>
  <Labels name="type" toName="text">
    <Label />
    <Label value="" />
  </Labels>
</View>