HumanSignal / HumanSignal/label-studio
Delete Duplicate Tasks does not work as expected, when working with cloud storage.
- Dominant language
- TypeScript
- Stars
- 28.3k
- Forks
- 3.7k
- Avg merge
- 14h
- Merged PRs (30d)
- 15
Description
**Describe the bug**
There is some discrepancy between the description of “Delete Duplicate Tasks” — Duplicate tasks will be deleted and all annotations will be moved from the duplicate task to the first task—and the actual effect.
**To Reproduce**
Two “cloud storage” one is “image_only” (reg: .*jpg) and one is “image_json_annotated” (reg: .*json). Both data sources point to the same bucket. Both sources have same data fields after importing (Therefore they are considered as duplicate tasks — consistent with expectations). Suppose there are 10 data (10 image and 10 json in the bucket).
Steps to reproduce the behavior:
1. Sync “image_only” source. -> 10 tasks are created, without annotation, id from 1-10.
2. Sync “image_json_annotated” source. -> 10 tasks are created, with annotation, id from 11-20.
3. Click "Delete Duplicate Tasks". -> Not as expected: The first 10 tasks (id: 1-10) are removed, not the last 10 (id: 11-20) as in the description.
4. Sync “image_only” source. -> 10 tasks are created, without annotation, id from 21-30.
5. Sync “image_json_annotated” source. -> 0 tasks are created.
**Expected behavior**
When duplicate tasks appear, the later ones are removed and the annotations will be moved to the first task.
1. Sync “image_only” source. -> 10 tasks are created, without annotation, id from 1-10.
2. Sync “image_json_annotated” source. -> 10 tasks are created, with annotation, id from 11-20.
3. Click "Delete Duplicate Tasks". -> The last 10 tasks (id: 11-20) are removed, and the annotations move to the first 10 tasks.
4. Sync “image_only” source. -> 0 tasks are created.
5. “image_only” source add new image (let's say 5).
6. Sync “image_only” source. -> 5 tasks are created, without annotation, id from 21-25.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment (please complete the following information):**
- OS: linux + docker compose
- Label Studio Version: 1.13.1
**Additional context**
More background:
* I have a lot of already annotated image data. And already have the required json. They are placed in s3. I have successfully imported the annotation information into the project. And deleting those json files made it so that I only had images in my source.
* I would like to be able to import new unlabeled images into the project every time, just by adding the image to the data source and clicking “sync”, without having to click “Delete Duplicate Tasks” or creat any json files.
* The way I do this is to transfer the annotation information from the Json to the task that the image was created on, so that when I have a new image I can simply do the import of the new task via the sync source.
I'd appreciate any more recommendations on how to do this.
Contributor guide
Assessment
This issue has not been assessed yet.