HumanSignal / HumanSignal/label-studio-sdk
Task lists produce annotations with None
- Dominant language
- Python
- Stars
- 192
- Forks
- 127
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
```
tasks = client.tasks.list(project="1")
for task in tasks:
print( task.data['username'] )
print( task.annotations )
```
when running this code, task.annotations is printed as `None`, but with the following workaround I am able to get the annotations:
```
tasks = client.tasks.list(project="1")
for task in tasks:
print( task.data['username'] )
annotations = client._client_wrapper.httpx_client.request(f"api/tasks/{task.id}/annotations/", method="GET").json()
print( annotations )
```
Looking at the code, most likely I should have defined `fields = "all"` on the `client.tasks.list` for them not to be `None`, but this is not the specified [in short the documentation](https://github.com/HumanSignal/label-studio-sdk?tab=readme-ov-file#get-tasks-with-annotations-and-predictions). If I could choose, I would instead change the default of `client.tasks.list` as `fields ="all"` to simplify the API use.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.