HumanSignal / HumanSignal/label-studio

labels field of the annotations got dropped or mangled

Open
#1,601 2 comments 0 reactions 1 assignee Claimed by @makseq View on GitHub
export problem text
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
Somehow the labels field of the annotations got dropped. I noticed the problem when running the attached JSON file export ([_bad-annotation.json.txt](https://github.com/heartexlabs/label-studio/files/7333787/_bad-annotation.json.txt)) through the CONLL2003 converter.

Here's the problematic section from the JSON file:
```
{
"value" : {
"end" : 2180,
"text" : " ^identified i ",
"start" : 2145
},
"from_name" : "label",
"type" : "labels",
"id" : "ZNgZKDPsmk",
"to_name" : "text"
}
```

By the way, a related problem was that an invalid label got used in the annotations (e.g., b instead of block):
```
{
"value" : {
"start" : 2145,
"end" : 2180,
"text" : " ^identified i\n ",
"labels" : [
"b"
]
},
"type" : "labels",
"from_name" : "label",
"to_name" : "text"
}
```

**To Reproduce**
I'm not sure how to reproduce the problem: I just noticed the problem downstream when doing the conversion. See https://github.com/heartexlabs/label-studio-converter/issues/61#issue-1024620914.

**Environment (please complete the following information):**
- OS: Ubuntu 18.04
- Label Studio Version 1.2

**Additional context**

I created two separate tickets because there are two issues:
1. Task DB getting corrupted
2. Converted not handling annotation spans with missing fields.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.