label-studio-sdk 2.0.0__py3-none-any.whl → 2.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +24 -0
- label_studio_sdk/actions/client.py +13 -13
- label_studio_sdk/actions/types/actions_list_response_item.py +3 -3
- label_studio_sdk/actions/types/actions_list_response_item_dialog.py +2 -2
- label_studio_sdk/annotations/client.py +441 -441
- label_studio_sdk/base_client.py +4 -0
- label_studio_sdk/billing/__init__.py +2 -0
- label_studio_sdk/billing/client.py +112 -0
- label_studio_sdk/comments/client.py +176 -176
- label_studio_sdk/export_storage/azure/client.py +274 -274
- label_studio_sdk/export_storage/gcs/client.py +263 -263
- label_studio_sdk/export_storage/local/client.py +206 -206
- label_studio_sdk/export_storage/redis/client.py +287 -287
- label_studio_sdk/export_storage/s3/client.py +347 -347
- label_studio_sdk/export_storage/s3s/client.py +678 -678
- label_studio_sdk/import_storage/azure/client.py +357 -357
- label_studio_sdk/import_storage/gcs/client.py +357 -357
- label_studio_sdk/import_storage/local/client.py +206 -206
- label_studio_sdk/import_storage/redis/client.py +309 -309
- label_studio_sdk/import_storage/s3/client.py +452 -452
- label_studio_sdk/import_storage/s3s/client.py +735 -735
- label_studio_sdk/jwt_settings/client.py +10 -10
- label_studio_sdk/ml/client.py +118 -118
- label_studio_sdk/ml/types/ml_list_model_versions_response.py +1 -1
- label_studio_sdk/model_providers/client.py +181 -181
- label_studio_sdk/organizations/members/client.py +348 -2
- label_studio_sdk/predictions/client.py +60 -60
- label_studio_sdk/projects/__init__.py +30 -1
- label_studio_sdk/projects/assignments/__init__.py +33 -0
- label_studio_sdk/projects/assignments/client.py +764 -0
- label_studio_sdk/projects/assignments/types/__init__.py +35 -0
- label_studio_sdk/projects/assignments/types/assignments_assign_request_type.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters.py +33 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_conjunction.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item.py +44 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_filter.py +31 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_operator.py +23 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_value.py +7 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items.py +9 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_excluded.py +29 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_included.py +29 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_type.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_response.py +22 -0
- label_studio_sdk/projects/assignments/types/assignments_update_request_type.py +5 -0
- label_studio_sdk/projects/client.py +441 -425
- label_studio_sdk/projects/exports/client.py +55 -55
- label_studio_sdk/projects/exports/types/exports_convert_response.py +1 -1
- label_studio_sdk/projects/stats/types/stats_iaa_response.py +5 -5
- label_studio_sdk/projects/types/projects_import_tasks_response.py +12 -12
- label_studio_sdk/prompts/client.py +211 -211
- label_studio_sdk/prompts/runs/client.py +33 -33
- label_studio_sdk/prompts/versions/client.py +72 -72
- label_studio_sdk/tasks/client.py +174 -174
- label_studio_sdk/types/__init__.py +22 -0
- label_studio_sdk/types/all_roles_project_list.py +98 -98
- label_studio_sdk/types/annotation.py +35 -35
- label_studio_sdk/types/annotation_request.py +27 -27
- label_studio_sdk/types/azure_blob_export_storage.py +29 -29
- label_studio_sdk/types/azure_blob_import_storage.py +33 -33
- label_studio_sdk/types/batch_failed_predictions.py +1 -1
- label_studio_sdk/types/billing_checks.py +39 -0
- label_studio_sdk/types/billing_flags.py +44 -0
- label_studio_sdk/types/billing_info_response.py +22 -0
- label_studio_sdk/types/blueprint_list.py +7 -8
- label_studio_sdk/types/child_filter.py +11 -10
- label_studio_sdk/types/comment.py +15 -15
- label_studio_sdk/types/comment_request.py +7 -8
- label_studio_sdk/types/comment_serializer_with_expanded_user.py +17 -18
- label_studio_sdk/types/converted_format.py +1 -1
- label_studio_sdk/types/converted_format_request.py +1 -1
- label_studio_sdk/types/count_limit.py +22 -0
- label_studio_sdk/types/export.py +8 -8
- label_studio_sdk/types/file_upload.py +3 -2
- label_studio_sdk/types/filter.py +10 -9
- label_studio_sdk/types/filter_group.py +4 -3
- label_studio_sdk/types/gcs_export_storage.py +23 -23
- label_studio_sdk/types/gcs_import_storage.py +27 -27
- label_studio_sdk/types/import_api_request.py +26 -26
- label_studio_sdk/types/inference_run_cost_estimate.py +10 -10
- label_studio_sdk/types/local_files_export_storage.py +23 -23
- label_studio_sdk/types/local_files_import_storage.py +26 -26
- label_studio_sdk/types/lse_annotation_filter_options.py +10 -10
- label_studio_sdk/types/lse_annotation_filter_options_request.py +10 -10
- label_studio_sdk/types/lse_export_create.py +12 -12
- label_studio_sdk/types/lse_fields.py +14 -14
- label_studio_sdk/types/lse_organization.py +17 -17
- label_studio_sdk/types/lse_organization_member_list.py +32 -0
- label_studio_sdk/types/lse_project_create.py +72 -72
- label_studio_sdk/types/lse_project_update.py +89 -89
- label_studio_sdk/types/lse_s3export_storage.py +46 -46
- label_studio_sdk/types/lse_s3export_storage_request.py +43 -43
- label_studio_sdk/types/lse_s3import_storage.py +53 -53
- label_studio_sdk/types/lse_s3import_storage_request.py +49 -49
- label_studio_sdk/types/lse_task.py +49 -49
- label_studio_sdk/types/lse_task_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_filter_options.py +14 -14
- label_studio_sdk/types/lse_task_filter_options_request.py +14 -14
- label_studio_sdk/types/lse_task_predictions_item.py +5 -5
- label_studio_sdk/types/lse_task_serializer_for_annotators.py +12 -12
- label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +5 -5
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +49 -49
- label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +5 -5
- label_studio_sdk/types/lse_user.py +13 -13
- label_studio_sdk/types/lse_user_api.py +11 -11
- label_studio_sdk/types/lse_user_organization_member_list.py +48 -0
- label_studio_sdk/types/lseapi_token_create.py +1 -1
- label_studio_sdk/types/lseapi_token_list.py +1 -1
- label_studio_sdk/types/lsejwt_settings.py +5 -5
- label_studio_sdk/types/ml_backend.py +27 -28
- label_studio_sdk/types/model_interface.py +12 -12
- label_studio_sdk/types/model_interface_request.py +7 -8
- label_studio_sdk/types/model_interface_serializer_get.py +13 -13
- label_studio_sdk/types/model_provider_connection.py +34 -34
- label_studio_sdk/types/model_provider_connection_request.py +15 -14
- label_studio_sdk/types/model_run.py +12 -12
- label_studio_sdk/types/organization_billing.py +1 -1
- label_studio_sdk/types/organization_id.py +2 -2
- label_studio_sdk/types/organization_invite.py +1 -1
- label_studio_sdk/types/organization_member.py +8 -9
- label_studio_sdk/types/organization_membership.py +2 -1
- label_studio_sdk/types/paginated_lse_organization_member_list_list.py +23 -0
- label_studio_sdk/types/pause.py +23 -23
- label_studio_sdk/types/prediction.py +21 -21
- label_studio_sdk/types/prediction_request.py +16 -16
- label_studio_sdk/types/project.py +72 -72
- label_studio_sdk/types/project_import.py +21 -21
- label_studio_sdk/types/prompts_status_enum.py +16 -0
- label_studio_sdk/types/redis_export_storage.py +34 -34
- label_studio_sdk/types/redis_import_storage.py +37 -37
- label_studio_sdk/types/refined_prompt_response.py +11 -11
- label_studio_sdk/types/review_settings.py +29 -30
- label_studio_sdk/types/review_settings_request.py +29 -30
- label_studio_sdk/types/role9e7enum.py +5 -0
- label_studio_sdk/types/s3export_storage.py +45 -45
- label_studio_sdk/types/s3import_storage.py +44 -44
- label_studio_sdk/types/selected_items_request.py +1 -1
- label_studio_sdk/types/serialization_options.py +10 -10
- label_studio_sdk/types/serialization_options_request.py +10 -10
- label_studio_sdk/types/task_assignment.py +43 -0
- label_studio_sdk/types/third_party_model_version.py +11 -11
- label_studio_sdk/types/third_party_model_version_request.py +6 -7
- label_studio_sdk/types/type_enum.py +5 -0
- label_studio_sdk/types/user_simple.py +3 -3
- label_studio_sdk/types/user_simple_request.py +1 -1
- label_studio_sdk/types/version_response.py +19 -20
- label_studio_sdk/types/view.py +8 -8
- label_studio_sdk/types/webhook.py +16 -16
- label_studio_sdk/types/webhook_serializer_for_update.py +16 -16
- label_studio_sdk/types/workspace.py +10 -11
- label_studio_sdk/users/client.py +160 -160
- label_studio_sdk/views/client.py +164 -164
- label_studio_sdk/webhooks/client.py +183 -183
- label_studio_sdk/webhooks/types/webhooks_info_response.py +32 -32
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +1 -1
- label_studio_sdk/workspaces/client.py +40 -40
- {label_studio_sdk-2.0.0.dist-info → label_studio_sdk-2.0.2.dist-info}/METADATA +73 -25
- {label_studio_sdk-2.0.0.dist-info → label_studio_sdk-2.0.2.dist-info}/RECORD +175 -146
- {label_studio_sdk-2.0.0.dist-info → label_studio_sdk-2.0.2.dist-info}/LICENSE +0 -0
- {label_studio_sdk-2.0.0.dist-info → label_studio_sdk-2.0.2.dist-info}/WHEEL +0 -0
|
@@ -79,10 +79,10 @@ class PredictionsClient:
|
|
|
79
79
|
def create(
|
|
80
80
|
self,
|
|
81
81
|
*,
|
|
82
|
-
|
|
82
|
+
model_version: typing.Optional[str] = OMIT,
|
|
83
83
|
result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
84
84
|
score: typing.Optional[float] = OMIT,
|
|
85
|
-
|
|
85
|
+
task: typing.Optional[int] = OMIT,
|
|
86
86
|
request_options: typing.Optional[RequestOptions] = None,
|
|
87
87
|
) -> Prediction:
|
|
88
88
|
"""
|
|
@@ -90,8 +90,8 @@ class PredictionsClient:
|
|
|
90
90
|
|
|
91
91
|
Parameters
|
|
92
92
|
----------
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
model_version : typing.Optional[str]
|
|
94
|
+
Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
|
|
95
95
|
|
|
96
96
|
result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
97
97
|
Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions)
|
|
@@ -99,8 +99,8 @@ class PredictionsClient:
|
|
|
99
99
|
score : typing.Optional[float]
|
|
100
100
|
Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first.
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
task : typing.Optional[int]
|
|
103
|
+
Task ID for which the prediction is created
|
|
104
104
|
|
|
105
105
|
request_options : typing.Optional[RequestOptions]
|
|
106
106
|
Request-specific configuration.
|
|
@@ -118,36 +118,36 @@ class PredictionsClient:
|
|
|
118
118
|
api_key="YOUR_API_KEY",
|
|
119
119
|
)
|
|
120
120
|
client.predictions.create(
|
|
121
|
+
model_version="yolo-v8",
|
|
121
122
|
result=[
|
|
122
123
|
{
|
|
123
|
-
"original_width": 1920,
|
|
124
|
-
"original_height": 1080,
|
|
125
|
-
"image_rotation": 0,
|
|
126
124
|
"from_name": "bboxes",
|
|
125
|
+
"image_rotation": 0,
|
|
126
|
+
"original_height": 1080,
|
|
127
|
+
"original_width": 1920,
|
|
127
128
|
"to_name": "image",
|
|
128
129
|
"type": "rectanglelabels",
|
|
129
130
|
"value": {
|
|
130
|
-
"x": 20,
|
|
131
|
-
"y": 30,
|
|
132
|
-
"width": 50,
|
|
133
131
|
"height": 60,
|
|
134
132
|
"rotation": 0,
|
|
135
133
|
"values": {"rectanglelabels": ["Person"]},
|
|
134
|
+
"width": 50,
|
|
135
|
+
"x": 20,
|
|
136
|
+
"y": 30,
|
|
136
137
|
},
|
|
137
138
|
}
|
|
138
139
|
],
|
|
139
140
|
score=0.95,
|
|
140
|
-
model_version="yolo-v8",
|
|
141
141
|
)
|
|
142
142
|
"""
|
|
143
143
|
_response = self._client_wrapper.httpx_client.request(
|
|
144
144
|
"api/predictions/",
|
|
145
145
|
method="POST",
|
|
146
146
|
json={
|
|
147
|
-
"
|
|
147
|
+
"model_version": model_version,
|
|
148
148
|
"result": result,
|
|
149
149
|
"score": score,
|
|
150
|
-
"
|
|
150
|
+
"task": task,
|
|
151
151
|
},
|
|
152
152
|
headers={
|
|
153
153
|
"content-type": "application/json",
|
|
@@ -260,10 +260,10 @@ class PredictionsClient:
|
|
|
260
260
|
self,
|
|
261
261
|
id: int,
|
|
262
262
|
*,
|
|
263
|
-
|
|
263
|
+
model_version: typing.Optional[str] = OMIT,
|
|
264
264
|
result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
265
265
|
score: typing.Optional[float] = OMIT,
|
|
266
|
-
|
|
266
|
+
task: typing.Optional[int] = OMIT,
|
|
267
267
|
request_options: typing.Optional[RequestOptions] = None,
|
|
268
268
|
) -> Prediction:
|
|
269
269
|
"""
|
|
@@ -274,8 +274,8 @@ class PredictionsClient:
|
|
|
274
274
|
id : int
|
|
275
275
|
Prediction ID
|
|
276
276
|
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
model_version : typing.Optional[str]
|
|
278
|
+
Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
|
|
279
279
|
|
|
280
280
|
result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
281
281
|
Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions)
|
|
@@ -283,8 +283,8 @@ class PredictionsClient:
|
|
|
283
283
|
score : typing.Optional[float]
|
|
284
284
|
Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first.
|
|
285
285
|
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
task : typing.Optional[int]
|
|
287
|
+
Task ID for which the prediction is created
|
|
288
288
|
|
|
289
289
|
request_options : typing.Optional[RequestOptions]
|
|
290
290
|
Request-specific configuration.
|
|
@@ -303,36 +303,36 @@ class PredictionsClient:
|
|
|
303
303
|
)
|
|
304
304
|
client.predictions.update(
|
|
305
305
|
id=1,
|
|
306
|
+
model_version="yolo-v8",
|
|
306
307
|
result=[
|
|
307
308
|
{
|
|
308
|
-
"original_width": 1920,
|
|
309
|
-
"original_height": 1080,
|
|
310
|
-
"image_rotation": 0,
|
|
311
309
|
"from_name": "bboxes",
|
|
310
|
+
"image_rotation": 0,
|
|
311
|
+
"original_height": 1080,
|
|
312
|
+
"original_width": 1920,
|
|
312
313
|
"to_name": "image",
|
|
313
314
|
"type": "rectanglelabels",
|
|
314
315
|
"value": {
|
|
315
|
-
"x": 20,
|
|
316
|
-
"y": 30,
|
|
317
|
-
"width": 50,
|
|
318
316
|
"height": 60,
|
|
319
317
|
"rotation": 0,
|
|
320
318
|
"values": {"rectanglelabels": ["Person"]},
|
|
319
|
+
"width": 50,
|
|
320
|
+
"x": 20,
|
|
321
|
+
"y": 30,
|
|
321
322
|
},
|
|
322
323
|
}
|
|
323
324
|
],
|
|
324
325
|
score=0.95,
|
|
325
|
-
model_version="yolo-v8",
|
|
326
326
|
)
|
|
327
327
|
"""
|
|
328
328
|
_response = self._client_wrapper.httpx_client.request(
|
|
329
329
|
f"api/predictions/{jsonable_encoder(id)}/",
|
|
330
330
|
method="PATCH",
|
|
331
331
|
json={
|
|
332
|
-
"
|
|
332
|
+
"model_version": model_version,
|
|
333
333
|
"result": result,
|
|
334
334
|
"score": score,
|
|
335
|
-
"
|
|
335
|
+
"task": task,
|
|
336
336
|
},
|
|
337
337
|
headers={
|
|
338
338
|
"content-type": "application/json",
|
|
@@ -428,10 +428,10 @@ class AsyncPredictionsClient:
|
|
|
428
428
|
async def create(
|
|
429
429
|
self,
|
|
430
430
|
*,
|
|
431
|
-
|
|
431
|
+
model_version: typing.Optional[str] = OMIT,
|
|
432
432
|
result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
433
433
|
score: typing.Optional[float] = OMIT,
|
|
434
|
-
|
|
434
|
+
task: typing.Optional[int] = OMIT,
|
|
435
435
|
request_options: typing.Optional[RequestOptions] = None,
|
|
436
436
|
) -> Prediction:
|
|
437
437
|
"""
|
|
@@ -439,8 +439,8 @@ class AsyncPredictionsClient:
|
|
|
439
439
|
|
|
440
440
|
Parameters
|
|
441
441
|
----------
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
model_version : typing.Optional[str]
|
|
443
|
+
Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
|
|
444
444
|
|
|
445
445
|
result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
446
446
|
Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions)
|
|
@@ -448,8 +448,8 @@ class AsyncPredictionsClient:
|
|
|
448
448
|
score : typing.Optional[float]
|
|
449
449
|
Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first.
|
|
450
450
|
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
task : typing.Optional[int]
|
|
452
|
+
Task ID for which the prediction is created
|
|
453
453
|
|
|
454
454
|
request_options : typing.Optional[RequestOptions]
|
|
455
455
|
Request-specific configuration.
|
|
@@ -472,26 +472,26 @@ class AsyncPredictionsClient:
|
|
|
472
472
|
|
|
473
473
|
async def main() -> None:
|
|
474
474
|
await client.predictions.create(
|
|
475
|
+
model_version="yolo-v8",
|
|
475
476
|
result=[
|
|
476
477
|
{
|
|
477
|
-
"original_width": 1920,
|
|
478
|
-
"original_height": 1080,
|
|
479
|
-
"image_rotation": 0,
|
|
480
478
|
"from_name": "bboxes",
|
|
479
|
+
"image_rotation": 0,
|
|
480
|
+
"original_height": 1080,
|
|
481
|
+
"original_width": 1920,
|
|
481
482
|
"to_name": "image",
|
|
482
483
|
"type": "rectanglelabels",
|
|
483
484
|
"value": {
|
|
484
|
-
"x": 20,
|
|
485
|
-
"y": 30,
|
|
486
|
-
"width": 50,
|
|
487
485
|
"height": 60,
|
|
488
486
|
"rotation": 0,
|
|
489
487
|
"values": {"rectanglelabels": ["Person"]},
|
|
488
|
+
"width": 50,
|
|
489
|
+
"x": 20,
|
|
490
|
+
"y": 30,
|
|
490
491
|
},
|
|
491
492
|
}
|
|
492
493
|
],
|
|
493
494
|
score=0.95,
|
|
494
|
-
model_version="yolo-v8",
|
|
495
495
|
)
|
|
496
496
|
|
|
497
497
|
|
|
@@ -501,10 +501,10 @@ class AsyncPredictionsClient:
|
|
|
501
501
|
"api/predictions/",
|
|
502
502
|
method="POST",
|
|
503
503
|
json={
|
|
504
|
-
"
|
|
504
|
+
"model_version": model_version,
|
|
505
505
|
"result": result,
|
|
506
506
|
"score": score,
|
|
507
|
-
"
|
|
507
|
+
"task": task,
|
|
508
508
|
},
|
|
509
509
|
headers={
|
|
510
510
|
"content-type": "application/json",
|
|
@@ -633,10 +633,10 @@ class AsyncPredictionsClient:
|
|
|
633
633
|
self,
|
|
634
634
|
id: int,
|
|
635
635
|
*,
|
|
636
|
-
|
|
636
|
+
model_version: typing.Optional[str] = OMIT,
|
|
637
637
|
result: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
638
638
|
score: typing.Optional[float] = OMIT,
|
|
639
|
-
|
|
639
|
+
task: typing.Optional[int] = OMIT,
|
|
640
640
|
request_options: typing.Optional[RequestOptions] = None,
|
|
641
641
|
) -> Prediction:
|
|
642
642
|
"""
|
|
@@ -647,8 +647,8 @@ class AsyncPredictionsClient:
|
|
|
647
647
|
id : int
|
|
648
648
|
Prediction ID
|
|
649
649
|
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
model_version : typing.Optional[str]
|
|
651
|
+
Model version - tag for predictions that can be used to filter tasks in Data Manager, as well as select specific model version for showing preannotations in the labeling interface
|
|
652
652
|
|
|
653
653
|
result : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
654
654
|
Prediction result in JSON format. Read more about the format in [the Label Studio documentation.](https://labelstud.io/guide/predictions)
|
|
@@ -656,8 +656,8 @@ class AsyncPredictionsClient:
|
|
|
656
656
|
score : typing.Optional[float]
|
|
657
657
|
Prediction score. Can be used in Data Manager to sort task by model confidence. Task with the lowest score will be shown first.
|
|
658
658
|
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
task : typing.Optional[int]
|
|
660
|
+
Task ID for which the prediction is created
|
|
661
661
|
|
|
662
662
|
request_options : typing.Optional[RequestOptions]
|
|
663
663
|
Request-specific configuration.
|
|
@@ -681,26 +681,26 @@ class AsyncPredictionsClient:
|
|
|
681
681
|
async def main() -> None:
|
|
682
682
|
await client.predictions.update(
|
|
683
683
|
id=1,
|
|
684
|
+
model_version="yolo-v8",
|
|
684
685
|
result=[
|
|
685
686
|
{
|
|
686
|
-
"original_width": 1920,
|
|
687
|
-
"original_height": 1080,
|
|
688
|
-
"image_rotation": 0,
|
|
689
687
|
"from_name": "bboxes",
|
|
688
|
+
"image_rotation": 0,
|
|
689
|
+
"original_height": 1080,
|
|
690
|
+
"original_width": 1920,
|
|
690
691
|
"to_name": "image",
|
|
691
692
|
"type": "rectanglelabels",
|
|
692
693
|
"value": {
|
|
693
|
-
"x": 20,
|
|
694
|
-
"y": 30,
|
|
695
|
-
"width": 50,
|
|
696
694
|
"height": 60,
|
|
697
695
|
"rotation": 0,
|
|
698
696
|
"values": {"rectanglelabels": ["Person"]},
|
|
697
|
+
"width": 50,
|
|
698
|
+
"x": 20,
|
|
699
|
+
"y": 30,
|
|
699
700
|
},
|
|
700
701
|
}
|
|
701
702
|
],
|
|
702
703
|
score=0.95,
|
|
703
|
-
model_version="yolo-v8",
|
|
704
704
|
)
|
|
705
705
|
|
|
706
706
|
|
|
@@ -710,10 +710,10 @@ class AsyncPredictionsClient:
|
|
|
710
710
|
f"api/predictions/{jsonable_encoder(id)}/",
|
|
711
711
|
method="PATCH",
|
|
712
712
|
json={
|
|
713
|
-
"
|
|
713
|
+
"model_version": model_version,
|
|
714
714
|
"result": result,
|
|
715
715
|
"score": score,
|
|
716
|
-
"
|
|
716
|
+
"task": task,
|
|
717
717
|
},
|
|
718
718
|
headers={
|
|
719
719
|
"content-type": "application/json",
|
|
@@ -9,11 +9,39 @@ from .types import (
|
|
|
9
9
|
ProjectsImportTasksResponse,
|
|
10
10
|
ProjectsListRequestFilter,
|
|
11
11
|
)
|
|
12
|
-
from . import exports, pauses, stats
|
|
12
|
+
from . import assignments, exports, pauses, stats
|
|
13
|
+
from .assignments import (
|
|
14
|
+
AssignmentsAssignRequestType,
|
|
15
|
+
AssignmentsBulkAssignRequestFilters,
|
|
16
|
+
AssignmentsBulkAssignRequestFiltersConjunction,
|
|
17
|
+
AssignmentsBulkAssignRequestFiltersItemsItem,
|
|
18
|
+
AssignmentsBulkAssignRequestFiltersItemsItemFilter,
|
|
19
|
+
AssignmentsBulkAssignRequestFiltersItemsItemOperator,
|
|
20
|
+
AssignmentsBulkAssignRequestFiltersItemsItemValue,
|
|
21
|
+
AssignmentsBulkAssignRequestSelectedItems,
|
|
22
|
+
AssignmentsBulkAssignRequestSelectedItemsExcluded,
|
|
23
|
+
AssignmentsBulkAssignRequestSelectedItemsIncluded,
|
|
24
|
+
AssignmentsBulkAssignRequestType,
|
|
25
|
+
AssignmentsBulkAssignResponse,
|
|
26
|
+
AssignmentsUpdateRequestType,
|
|
27
|
+
)
|
|
13
28
|
from .exports import ExportsConvertResponse
|
|
14
29
|
from .stats import StatsIaaResponse, StatsIaaResponseCommonTasks, StatsIaaResponseIaa, StatsIaaResponseStd
|
|
15
30
|
|
|
16
31
|
__all__ = [
|
|
32
|
+
"AssignmentsAssignRequestType",
|
|
33
|
+
"AssignmentsBulkAssignRequestFilters",
|
|
34
|
+
"AssignmentsBulkAssignRequestFiltersConjunction",
|
|
35
|
+
"AssignmentsBulkAssignRequestFiltersItemsItem",
|
|
36
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemFilter",
|
|
37
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemOperator",
|
|
38
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemValue",
|
|
39
|
+
"AssignmentsBulkAssignRequestSelectedItems",
|
|
40
|
+
"AssignmentsBulkAssignRequestSelectedItemsExcluded",
|
|
41
|
+
"AssignmentsBulkAssignRequestSelectedItemsIncluded",
|
|
42
|
+
"AssignmentsBulkAssignRequestType",
|
|
43
|
+
"AssignmentsBulkAssignResponse",
|
|
44
|
+
"AssignmentsUpdateRequestType",
|
|
17
45
|
"ExportsConvertResponse",
|
|
18
46
|
"LseProjectCreateRequestSampling",
|
|
19
47
|
"LseProjectCreateRequestSkipQueue",
|
|
@@ -26,6 +54,7 @@ __all__ = [
|
|
|
26
54
|
"StatsIaaResponseCommonTasks",
|
|
27
55
|
"StatsIaaResponseIaa",
|
|
28
56
|
"StatsIaaResponseStd",
|
|
57
|
+
"assignments",
|
|
29
58
|
"exports",
|
|
30
59
|
"pauses",
|
|
31
60
|
"stats",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from .types import (
|
|
4
|
+
AssignmentsAssignRequestType,
|
|
5
|
+
AssignmentsBulkAssignRequestFilters,
|
|
6
|
+
AssignmentsBulkAssignRequestFiltersConjunction,
|
|
7
|
+
AssignmentsBulkAssignRequestFiltersItemsItem,
|
|
8
|
+
AssignmentsBulkAssignRequestFiltersItemsItemFilter,
|
|
9
|
+
AssignmentsBulkAssignRequestFiltersItemsItemOperator,
|
|
10
|
+
AssignmentsBulkAssignRequestFiltersItemsItemValue,
|
|
11
|
+
AssignmentsBulkAssignRequestSelectedItems,
|
|
12
|
+
AssignmentsBulkAssignRequestSelectedItemsExcluded,
|
|
13
|
+
AssignmentsBulkAssignRequestSelectedItemsIncluded,
|
|
14
|
+
AssignmentsBulkAssignRequestType,
|
|
15
|
+
AssignmentsBulkAssignResponse,
|
|
16
|
+
AssignmentsUpdateRequestType,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"AssignmentsAssignRequestType",
|
|
21
|
+
"AssignmentsBulkAssignRequestFilters",
|
|
22
|
+
"AssignmentsBulkAssignRequestFiltersConjunction",
|
|
23
|
+
"AssignmentsBulkAssignRequestFiltersItemsItem",
|
|
24
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemFilter",
|
|
25
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemOperator",
|
|
26
|
+
"AssignmentsBulkAssignRequestFiltersItemsItemValue",
|
|
27
|
+
"AssignmentsBulkAssignRequestSelectedItems",
|
|
28
|
+
"AssignmentsBulkAssignRequestSelectedItemsExcluded",
|
|
29
|
+
"AssignmentsBulkAssignRequestSelectedItemsIncluded",
|
|
30
|
+
"AssignmentsBulkAssignRequestType",
|
|
31
|
+
"AssignmentsBulkAssignResponse",
|
|
32
|
+
"AssignmentsUpdateRequestType",
|
|
33
|
+
]
|