Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,17 @@ task_id = client.update_image_task(
]
}
],
# pass annotation indexes to update
relations=[
{
"startIndex": 1,
"endIndex": 0,
},
{
"startIndex": 2,
"endIndex": 0
}
]
)
```

Expand Down
4 changes: 4 additions & 0 deletions fastlabel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,7 @@ def update_image_task(
priority: Priority = None,
tags: list = [],
annotations: List[dict] = [],
relations: Optional[List[dict]] = None,
**kwargs,
) -> str:
"""
Expand All @@ -1888,6 +1889,7 @@ def update_image_task(
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
tags is a list of tag to be set (Optional).
annotations is a list of annotation to be set (Optional).
relations is a list of annotation relations to be set (Optional).
assignee is slug of assigned user (Optional).
reviewer is slug of review user (Optional).
approver is slug of approve user (Optional).
Expand All @@ -1911,6 +1913,8 @@ def update_image_task(
# the content will be filled on the server side.
annotation["content"] = ""
payload["annotations"] = delete_extra_annotations_parameter(annotations)
if relations:
payload["relations"] = relations

self.__fill_assign_users(payload, **kwargs)

Expand Down