HumanSignal / HumanSignal/label-studio

specifying ids when export data does not work

Open
#6,287 4 comments 0 reactions 0 assignees View on GitHub
community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

Per the document, when export data of a project, we can specify the `ids` param to indicate the tasks of interest and only export data relevant to these tasks.
[Docs for using SDK here](https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_tasks)
[Docs for using API here](https://api.labelstud.io/api-reference/api-reference/projects/exports/create-export)

But when I actually specified `ids`, the exports always contained all annotations and relevant resources( if `download_resources` set to `true`)

**To Reproduce**
Steps to reproduce the behavior:
1. Using API:
```bash
curl -G http://:/api/projects//export \
-H "Authorization: Token " \
-d export_type=VOC \
-d download_all_tasks=false \
-d download_resources=true \
-d ids=[]

```
2. Using SDK:
```python
# python version 3.12.2
# SDK version 1.0.5
from label_studio_sdk import Client
ls = Client(url=url, api_key=key)
project = ls.get_project(projectID)
results = project.export_tasks(
export_type=VOC,
download_resources=True,
download_all_tasks=False,
ids=[list of task ids],
export_location=,
)
```

Any ideas why the ids not taking effect and it always export all data?
I tested export formats of both `JSON` and `VOC`, got same results.
Help appreciated.

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.