HumanSignal / HumanSignal/label-studio
`origin` is not correctly set when predictions for `Choices` tag are modified
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
After importing predicted data into Label Studio, a `Choices` prediction is modified. However, when exporting the annotations, the `origin` attribute has the value `prediction` instead of `prediction-changed`.
**To Reproduce**
Steps to reproduce the behavior:
1. Setup the following labeling UI
```
```
1. Import the following predicted data (`Male` is selected):
```
[{
"data": {
"text": "Lorem ipsum bla bla."
},
"predictions": [{
"model_version": "one",
"score": 0.5,
"result": [
{
"id": "some_id",
"type": "choices",
"from_name": "gender", "to_name": "txt-1",
"value": {
"choices": ["M"]
}
}]
}]
}]
```
1. Navigate to the labeling task, select `Female` and click Submit.
1. Export the new annotation.
**Expected behavior**
`origin` should have the value `prediction-changed` in the exported JSON.
The relevant part in the actual exported JSON:
```
"result": [
{
"value": {
"choices": [
"F"
]
},
"id": "some_id",
"from_name": "gender",
"to_name": "txt-1",
"type": "choices",
"origin": "prediction"
}
],
...
"prediction": {
"id": 80662,
"model_version": "one",
"created_ago": "0 minutes",
"result": [
{
"id": "some_id",
"type": "choices",
"from_name": "gender",
"to_name": "txt-1",
"value": {
"choices": [
"M"
]
}
}
],
```
**Environment (please complete the following information):**
- Label Studio Version: 1.7.1
Contributor guide
Assessment
This issue has not been assessed yet.