label-studio-sdk 2.0.11__py3-none-any.whl → 2.0.13__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 +12 -8
- label_studio_sdk/actions/__init__.py +2 -0
- label_studio_sdk/actions/types/__init__.py +2 -0
- label_studio_sdk/actions/types/actions_list_response_item.py +2 -1
- label_studio_sdk/actions/types/actions_list_response_item_permission.py +5 -0
- label_studio_sdk/core/client_wrapper.py +6 -1
- label_studio_sdk/export_storage/azure/client.py +14 -10
- label_studio_sdk/export_storage/azure_spi/client.py +14 -10
- label_studio_sdk/export_storage/databricks/client.py +14 -10
- label_studio_sdk/export_storage/gcs/client.py +14 -10
- label_studio_sdk/export_storage/gcswif/client.py +14 -10
- label_studio_sdk/export_storage/local/client.py +14 -10
- label_studio_sdk/export_storage/redis/client.py +14 -10
- label_studio_sdk/export_storage/s3/client.py +14 -10
- label_studio_sdk/export_storage/s3s/client.py +14 -10
- label_studio_sdk/import_storage/azure/client.py +14 -10
- label_studio_sdk/import_storage/azure_spi/client.py +14 -10
- label_studio_sdk/import_storage/databricks/client.py +14 -10
- label_studio_sdk/import_storage/gcs/client.py +14 -10
- label_studio_sdk/import_storage/gcswif/client.py +14 -10
- label_studio_sdk/import_storage/local/client.py +14 -10
- label_studio_sdk/import_storage/redis/client.py +14 -10
- label_studio_sdk/import_storage/s3/client.py +14 -10
- label_studio_sdk/import_storage/s3s/client.py +14 -10
- label_studio_sdk/label_interface/control_tags.py +2 -1
- label_studio_sdk/organizations/__init__.py +1 -2
- label_studio_sdk/organizations/client.py +0 -36
- label_studio_sdk/organizations/permissions/client.py +32 -0
- label_studio_sdk/projects/__init__.py +18 -1
- label_studio_sdk/projects/client.py +8 -0
- label_studio_sdk/projects/members/client.py +137 -30
- label_studio_sdk/projects/metrics/custom/client.py +48 -0
- label_studio_sdk/projects/roles/__init__.py +2 -0
- label_studio_sdk/projects/roles/client.py +555 -0
- label_studio_sdk/projects/stats/__init__.py +16 -0
- label_studio_sdk/projects/stats/client.py +626 -0
- label_studio_sdk/projects/stats/types/__init__.py +22 -0
- label_studio_sdk/projects/stats/types/stats_agreement_annotators_response.py +22 -0
- label_studio_sdk/projects/stats/types/stats_users_ground_truth_agreement_response.py +27 -0
- label_studio_sdk/projects/stats/types/stats_users_ground_truth_agreement_response_agreement_value.py +5 -0
- label_studio_sdk/projects/stats/types/stats_users_prediction_agreement_response.py +27 -0
- label_studio_sdk/projects/stats/types/stats_users_prediction_agreement_response_agreement_value.py +5 -0
- label_studio_sdk/projects/stats/types/stats_users_review_score_response.py +35 -0
- label_studio_sdk/projects/stats/types/stats_users_review_score_response_performance_score_value.py +5 -0
- label_studio_sdk/projects/stats/types/stats_users_review_score_response_review_score_value.py +5 -0
- label_studio_sdk/prompts/versions/client.py +24 -0
- label_studio_sdk/tasks/client.py +10 -0
- label_studio_sdk/types/__init__.py +10 -6
- label_studio_sdk/types/activity_log.py +1 -0
- label_studio_sdk/types/all_roles_project_list.py +6 -2
- label_studio_sdk/types/billing_flags.py +1 -1
- label_studio_sdk/types/default_role.py +0 -9
- label_studio_sdk/types/import_api_request.py +5 -0
- label_studio_sdk/types/lse_organization.py +1 -10
- label_studio_sdk/types/lse_project.py +6 -6
- label_studio_sdk/types/lse_project_counts.py +1 -1
- label_studio_sdk/types/lse_project_create.py +5 -1
- label_studio_sdk/types/lse_project_response.py +5 -1
- label_studio_sdk/types/lse_project_update.py +5 -1
- label_studio_sdk/types/lse_task.py +5 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +5 -0
- label_studio_sdk/types/project.py +198 -0
- label_studio_sdk/types/project_member.py +19 -0
- label_studio_sdk/types/project_role.py +35 -0
- label_studio_sdk/types/project_sampling.py +7 -0
- label_studio_sdk/types/project_skip_queue.py +7 -0
- label_studio_sdk/versions/client.py +0 -12
- label_studio_sdk/workspaces/__init__.py +2 -2
- label_studio_sdk/workspaces/client.py +4 -0
- label_studio_sdk/workspaces/projects/__init__.py +2 -0
- label_studio_sdk/workspaces/projects/client.py +352 -0
- {label_studio_sdk-2.0.11.dist-info → label_studio_sdk-2.0.13.dist-info}/METADATA +1 -1
- {label_studio_sdk-2.0.11.dist-info → label_studio_sdk-2.0.13.dist-info}/RECORD +75 -62
- label_studio_sdk/organizations/types/__init__.py +0 -5
- label_studio_sdk/organizations/types/patched_default_role_request_custom_scripts_editable_by.py +0 -7
- label_studio_sdk/types/custom_scripts_editable_by_enum.py +0 -5
- label_studio_sdk/types/default_role_custom_scripts_editable_by.py +0 -7
- label_studio_sdk/types/lse_organization_custom_scripts_editable_by.py +0 -7
- {label_studio_sdk-2.0.11.dist-info → label_studio_sdk-2.0.13.dist-info}/LICENSE +0 -0
- {label_studio_sdk-2.0.11.dist-info → label_studio_sdk-2.0.13.dist-info}/WHEEL +0 -0
|
@@ -11,11 +11,15 @@ from ...core.api_error import ApiError
|
|
|
11
11
|
from .types.stats_model_version_ground_truth_agreement_response import StatsModelVersionGroundTruthAgreementResponse
|
|
12
12
|
from .types.stats_model_version_prediction_agreement_response import StatsModelVersionPredictionAgreementResponse
|
|
13
13
|
from .types.stats_iaa_response import StatsIaaResponse
|
|
14
|
+
from .types.stats_users_ground_truth_agreement_response import StatsUsersGroundTruthAgreementResponse
|
|
14
15
|
from .types.stats_agreement_annotator_response import StatsAgreementAnnotatorResponse
|
|
16
|
+
from .types.stats_agreement_annotators_response import StatsAgreementAnnotatorsResponse
|
|
15
17
|
from .types.stats_data_filters_response import StatsDataFiltersResponse
|
|
16
18
|
from .types.stats_finished_tasks_response import StatsFinishedTasksResponse
|
|
17
19
|
from .types.stats_lead_time_response import StatsLeadTimeResponse
|
|
18
20
|
from .types.stats_total_agreement_response import StatsTotalAgreementResponse
|
|
21
|
+
from .types.stats_users_prediction_agreement_response import StatsUsersPredictionAgreementResponse
|
|
22
|
+
from .types.stats_users_review_score_response import StatsUsersReviewScoreResponse
|
|
19
23
|
from .types.stats_user_prediction_agreement_response import StatsUserPredictionAgreementResponse
|
|
20
24
|
from .types.stats_user_review_score_response import StatsUserReviewScoreResponse
|
|
21
25
|
from .types.stats_user_ground_truth_agreement_response import StatsUserGroundTruthAgreementResponse
|
|
@@ -298,6 +302,76 @@ class StatsClient:
|
|
|
298
302
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
299
303
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
300
304
|
|
|
305
|
+
def users_ground_truth_agreement(
|
|
306
|
+
self,
|
|
307
|
+
id: int,
|
|
308
|
+
*,
|
|
309
|
+
ids: str,
|
|
310
|
+
per_label: typing.Optional[bool] = None,
|
|
311
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
312
|
+
) -> StatsUsersGroundTruthAgreementResponse:
|
|
313
|
+
"""
|
|
314
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
315
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
316
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
317
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
318
|
+
</p>
|
|
319
|
+
</Card>
|
|
320
|
+
Get ground truth agreement statistics for multiple users within a project.
|
|
321
|
+
|
|
322
|
+
Parameters
|
|
323
|
+
----------
|
|
324
|
+
id : int
|
|
325
|
+
|
|
326
|
+
ids : str
|
|
327
|
+
Comma separated list of user IDs to get ground truth agreement for
|
|
328
|
+
|
|
329
|
+
per_label : typing.Optional[bool]
|
|
330
|
+
Per label
|
|
331
|
+
|
|
332
|
+
request_options : typing.Optional[RequestOptions]
|
|
333
|
+
Request-specific configuration.
|
|
334
|
+
|
|
335
|
+
Returns
|
|
336
|
+
-------
|
|
337
|
+
StatsUsersGroundTruthAgreementResponse
|
|
338
|
+
Ground truth agreement statistics for multiple users
|
|
339
|
+
|
|
340
|
+
Examples
|
|
341
|
+
--------
|
|
342
|
+
from label_studio_sdk import LabelStudio
|
|
343
|
+
|
|
344
|
+
client = LabelStudio(
|
|
345
|
+
api_key="YOUR_API_KEY",
|
|
346
|
+
)
|
|
347
|
+
client.projects.stats.users_ground_truth_agreement(
|
|
348
|
+
id=1,
|
|
349
|
+
ids="ids",
|
|
350
|
+
)
|
|
351
|
+
"""
|
|
352
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
353
|
+
f"api/projects/{jsonable_encoder(id)}/stats/agreement-groundtruth",
|
|
354
|
+
method="GET",
|
|
355
|
+
params={
|
|
356
|
+
"ids": ids,
|
|
357
|
+
"per_label": per_label,
|
|
358
|
+
},
|
|
359
|
+
request_options=request_options,
|
|
360
|
+
)
|
|
361
|
+
try:
|
|
362
|
+
if 200 <= _response.status_code < 300:
|
|
363
|
+
return typing.cast(
|
|
364
|
+
StatsUsersGroundTruthAgreementResponse,
|
|
365
|
+
construct_type(
|
|
366
|
+
type_=StatsUsersGroundTruthAgreementResponse, # type: ignore
|
|
367
|
+
object_=_response.json(),
|
|
368
|
+
),
|
|
369
|
+
)
|
|
370
|
+
_response_json = _response.json()
|
|
371
|
+
except JSONDecodeError:
|
|
372
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
373
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
374
|
+
|
|
301
375
|
def agreement_annotator(
|
|
302
376
|
self, id: int, user_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
303
377
|
) -> StatsAgreementAnnotatorResponse:
|
|
@@ -355,10 +429,77 @@ class StatsClient:
|
|
|
355
429
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
356
430
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
357
431
|
|
|
432
|
+
def agreement_annotators(
|
|
433
|
+
self, id: int, *, ids: str, request_options: typing.Optional[RequestOptions] = None
|
|
434
|
+
) -> StatsAgreementAnnotatorsResponse:
|
|
435
|
+
"""
|
|
436
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
437
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
438
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
439
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
440
|
+
</p>
|
|
441
|
+
</Card>
|
|
442
|
+
Get agreement statistics for multiple annotators within a project.
|
|
443
|
+
|
|
444
|
+
Parameters
|
|
445
|
+
----------
|
|
446
|
+
id : int
|
|
447
|
+
|
|
448
|
+
ids : str
|
|
449
|
+
Comma separated list of annotator user IDs to get agreement scores for
|
|
450
|
+
|
|
451
|
+
request_options : typing.Optional[RequestOptions]
|
|
452
|
+
Request-specific configuration.
|
|
453
|
+
|
|
454
|
+
Returns
|
|
455
|
+
-------
|
|
456
|
+
StatsAgreementAnnotatorsResponse
|
|
457
|
+
Multiple annotator agreement statistics
|
|
458
|
+
|
|
459
|
+
Examples
|
|
460
|
+
--------
|
|
461
|
+
from label_studio_sdk import LabelStudio
|
|
462
|
+
|
|
463
|
+
client = LabelStudio(
|
|
464
|
+
api_key="YOUR_API_KEY",
|
|
465
|
+
)
|
|
466
|
+
client.projects.stats.agreement_annotators(
|
|
467
|
+
id=1,
|
|
468
|
+
ids="ids",
|
|
469
|
+
)
|
|
470
|
+
"""
|
|
471
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
472
|
+
f"api/projects/{jsonable_encoder(id)}/stats/agreement_annotators",
|
|
473
|
+
method="GET",
|
|
474
|
+
params={
|
|
475
|
+
"ids": ids,
|
|
476
|
+
},
|
|
477
|
+
request_options=request_options,
|
|
478
|
+
)
|
|
479
|
+
try:
|
|
480
|
+
if 200 <= _response.status_code < 300:
|
|
481
|
+
return typing.cast(
|
|
482
|
+
StatsAgreementAnnotatorsResponse,
|
|
483
|
+
construct_type(
|
|
484
|
+
type_=StatsAgreementAnnotatorsResponse, # type: ignore
|
|
485
|
+
object_=_response.json(),
|
|
486
|
+
),
|
|
487
|
+
)
|
|
488
|
+
_response_json = _response.json()
|
|
489
|
+
except JSONDecodeError:
|
|
490
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
491
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
492
|
+
|
|
358
493
|
def data_filters(
|
|
359
494
|
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
360
495
|
) -> StatsDataFiltersResponse:
|
|
361
496
|
"""
|
|
497
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
498
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
499
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
500
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
501
|
+
</p>
|
|
502
|
+
</Card>
|
|
362
503
|
Get statistics about user data filters and their usage within a project.
|
|
363
504
|
|
|
364
505
|
Parameters
|
|
@@ -407,6 +548,12 @@ class StatsClient:
|
|
|
407
548
|
self, id: int, *, user_pk: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
|
|
408
549
|
) -> StatsFinishedTasksResponse:
|
|
409
550
|
"""
|
|
551
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
552
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
553
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
554
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
555
|
+
</p>
|
|
556
|
+
</Card>
|
|
410
557
|
Get statistics about finished tasks for a project.
|
|
411
558
|
|
|
412
559
|
Parameters
|
|
@@ -459,6 +606,12 @@ class StatsClient:
|
|
|
459
606
|
|
|
460
607
|
def lead_time(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> StatsLeadTimeResponse:
|
|
461
608
|
"""
|
|
609
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
610
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
611
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
612
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
613
|
+
</p>
|
|
614
|
+
</Card>
|
|
462
615
|
Get lead time statistics across the project, including average annotation time.
|
|
463
616
|
|
|
464
617
|
Parameters
|
|
@@ -577,6 +730,12 @@ class StatsClient:
|
|
|
577
730
|
request_options: typing.Optional[RequestOptions] = None,
|
|
578
731
|
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
579
732
|
"""
|
|
733
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
734
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
735
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
736
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
737
|
+
</p>
|
|
738
|
+
</Card>
|
|
580
739
|
Start stats recalculation for given project
|
|
581
740
|
|
|
582
741
|
Parameters
|
|
@@ -627,6 +786,146 @@ class StatsClient:
|
|
|
627
786
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
628
787
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
629
788
|
|
|
789
|
+
def users_prediction_agreement(
|
|
790
|
+
self,
|
|
791
|
+
id: int,
|
|
792
|
+
*,
|
|
793
|
+
ids: str,
|
|
794
|
+
per_label: typing.Optional[bool] = None,
|
|
795
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
796
|
+
) -> StatsUsersPredictionAgreementResponse:
|
|
797
|
+
"""
|
|
798
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
799
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
800
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
801
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
802
|
+
</p>
|
|
803
|
+
</Card>
|
|
804
|
+
Get prediction agreement statistics for multiple annotators within a project.
|
|
805
|
+
|
|
806
|
+
Parameters
|
|
807
|
+
----------
|
|
808
|
+
id : int
|
|
809
|
+
|
|
810
|
+
ids : str
|
|
811
|
+
Comma separated list of annotator user IDs to get agreement scores for
|
|
812
|
+
|
|
813
|
+
per_label : typing.Optional[bool]
|
|
814
|
+
Per label
|
|
815
|
+
|
|
816
|
+
request_options : typing.Optional[RequestOptions]
|
|
817
|
+
Request-specific configuration.
|
|
818
|
+
|
|
819
|
+
Returns
|
|
820
|
+
-------
|
|
821
|
+
StatsUsersPredictionAgreementResponse
|
|
822
|
+
Prediction agreement statistics for multiple annotators
|
|
823
|
+
|
|
824
|
+
Examples
|
|
825
|
+
--------
|
|
826
|
+
from label_studio_sdk import LabelStudio
|
|
827
|
+
|
|
828
|
+
client = LabelStudio(
|
|
829
|
+
api_key="YOUR_API_KEY",
|
|
830
|
+
)
|
|
831
|
+
client.projects.stats.users_prediction_agreement(
|
|
832
|
+
id=1,
|
|
833
|
+
ids="ids",
|
|
834
|
+
)
|
|
835
|
+
"""
|
|
836
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
837
|
+
f"api/projects/{jsonable_encoder(id)}/user-stats/prediction",
|
|
838
|
+
method="GET",
|
|
839
|
+
params={
|
|
840
|
+
"ids": ids,
|
|
841
|
+
"per_label": per_label,
|
|
842
|
+
},
|
|
843
|
+
request_options=request_options,
|
|
844
|
+
)
|
|
845
|
+
try:
|
|
846
|
+
if 200 <= _response.status_code < 300:
|
|
847
|
+
return typing.cast(
|
|
848
|
+
StatsUsersPredictionAgreementResponse,
|
|
849
|
+
construct_type(
|
|
850
|
+
type_=StatsUsersPredictionAgreementResponse, # type: ignore
|
|
851
|
+
object_=_response.json(),
|
|
852
|
+
),
|
|
853
|
+
)
|
|
854
|
+
_response_json = _response.json()
|
|
855
|
+
except JSONDecodeError:
|
|
856
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
857
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
858
|
+
|
|
859
|
+
def users_review_score(
|
|
860
|
+
self,
|
|
861
|
+
id: int,
|
|
862
|
+
*,
|
|
863
|
+
ids: str,
|
|
864
|
+
per_label: typing.Optional[bool] = None,
|
|
865
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
866
|
+
) -> StatsUsersReviewScoreResponse:
|
|
867
|
+
"""
|
|
868
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
869
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
870
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
871
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
872
|
+
</p>
|
|
873
|
+
</Card>
|
|
874
|
+
Get review score and performance score statistics for multiple annotators within a project.
|
|
875
|
+
|
|
876
|
+
Parameters
|
|
877
|
+
----------
|
|
878
|
+
id : int
|
|
879
|
+
|
|
880
|
+
ids : str
|
|
881
|
+
Comma separated list of annotator user IDs to get review scores for
|
|
882
|
+
|
|
883
|
+
per_label : typing.Optional[bool]
|
|
884
|
+
Per label
|
|
885
|
+
|
|
886
|
+
request_options : typing.Optional[RequestOptions]
|
|
887
|
+
Request-specific configuration.
|
|
888
|
+
|
|
889
|
+
Returns
|
|
890
|
+
-------
|
|
891
|
+
StatsUsersReviewScoreResponse
|
|
892
|
+
Review scores and performance scores for multiple annotators
|
|
893
|
+
|
|
894
|
+
Examples
|
|
895
|
+
--------
|
|
896
|
+
from label_studio_sdk import LabelStudio
|
|
897
|
+
|
|
898
|
+
client = LabelStudio(
|
|
899
|
+
api_key="YOUR_API_KEY",
|
|
900
|
+
)
|
|
901
|
+
client.projects.stats.users_review_score(
|
|
902
|
+
id=1,
|
|
903
|
+
ids="ids",
|
|
904
|
+
)
|
|
905
|
+
"""
|
|
906
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
907
|
+
f"api/projects/{jsonable_encoder(id)}/user-stats/review_score",
|
|
908
|
+
method="GET",
|
|
909
|
+
params={
|
|
910
|
+
"ids": ids,
|
|
911
|
+
"per_label": per_label,
|
|
912
|
+
},
|
|
913
|
+
request_options=request_options,
|
|
914
|
+
)
|
|
915
|
+
try:
|
|
916
|
+
if 200 <= _response.status_code < 300:
|
|
917
|
+
return typing.cast(
|
|
918
|
+
StatsUsersReviewScoreResponse,
|
|
919
|
+
construct_type(
|
|
920
|
+
type_=StatsUsersReviewScoreResponse, # type: ignore
|
|
921
|
+
object_=_response.json(),
|
|
922
|
+
),
|
|
923
|
+
)
|
|
924
|
+
_response_json = _response.json()
|
|
925
|
+
except JSONDecodeError:
|
|
926
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
927
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
928
|
+
|
|
630
929
|
def user_prediction_agreement(
|
|
631
930
|
self,
|
|
632
931
|
id: int,
|
|
@@ -1140,6 +1439,84 @@ class AsyncStatsClient:
|
|
|
1140
1439
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1141
1440
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1142
1441
|
|
|
1442
|
+
async def users_ground_truth_agreement(
|
|
1443
|
+
self,
|
|
1444
|
+
id: int,
|
|
1445
|
+
*,
|
|
1446
|
+
ids: str,
|
|
1447
|
+
per_label: typing.Optional[bool] = None,
|
|
1448
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1449
|
+
) -> StatsUsersGroundTruthAgreementResponse:
|
|
1450
|
+
"""
|
|
1451
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1452
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1453
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1454
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1455
|
+
</p>
|
|
1456
|
+
</Card>
|
|
1457
|
+
Get ground truth agreement statistics for multiple users within a project.
|
|
1458
|
+
|
|
1459
|
+
Parameters
|
|
1460
|
+
----------
|
|
1461
|
+
id : int
|
|
1462
|
+
|
|
1463
|
+
ids : str
|
|
1464
|
+
Comma separated list of user IDs to get ground truth agreement for
|
|
1465
|
+
|
|
1466
|
+
per_label : typing.Optional[bool]
|
|
1467
|
+
Per label
|
|
1468
|
+
|
|
1469
|
+
request_options : typing.Optional[RequestOptions]
|
|
1470
|
+
Request-specific configuration.
|
|
1471
|
+
|
|
1472
|
+
Returns
|
|
1473
|
+
-------
|
|
1474
|
+
StatsUsersGroundTruthAgreementResponse
|
|
1475
|
+
Ground truth agreement statistics for multiple users
|
|
1476
|
+
|
|
1477
|
+
Examples
|
|
1478
|
+
--------
|
|
1479
|
+
import asyncio
|
|
1480
|
+
|
|
1481
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
1482
|
+
|
|
1483
|
+
client = AsyncLabelStudio(
|
|
1484
|
+
api_key="YOUR_API_KEY",
|
|
1485
|
+
)
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
async def main() -> None:
|
|
1489
|
+
await client.projects.stats.users_ground_truth_agreement(
|
|
1490
|
+
id=1,
|
|
1491
|
+
ids="ids",
|
|
1492
|
+
)
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
asyncio.run(main())
|
|
1496
|
+
"""
|
|
1497
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1498
|
+
f"api/projects/{jsonable_encoder(id)}/stats/agreement-groundtruth",
|
|
1499
|
+
method="GET",
|
|
1500
|
+
params={
|
|
1501
|
+
"ids": ids,
|
|
1502
|
+
"per_label": per_label,
|
|
1503
|
+
},
|
|
1504
|
+
request_options=request_options,
|
|
1505
|
+
)
|
|
1506
|
+
try:
|
|
1507
|
+
if 200 <= _response.status_code < 300:
|
|
1508
|
+
return typing.cast(
|
|
1509
|
+
StatsUsersGroundTruthAgreementResponse,
|
|
1510
|
+
construct_type(
|
|
1511
|
+
type_=StatsUsersGroundTruthAgreementResponse, # type: ignore
|
|
1512
|
+
object_=_response.json(),
|
|
1513
|
+
),
|
|
1514
|
+
)
|
|
1515
|
+
_response_json = _response.json()
|
|
1516
|
+
except JSONDecodeError:
|
|
1517
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1518
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1519
|
+
|
|
1143
1520
|
async def agreement_annotator(
|
|
1144
1521
|
self, id: int, user_id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1145
1522
|
) -> StatsAgreementAnnotatorResponse:
|
|
@@ -1205,10 +1582,85 @@ class AsyncStatsClient:
|
|
|
1205
1582
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1206
1583
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1207
1584
|
|
|
1585
|
+
async def agreement_annotators(
|
|
1586
|
+
self, id: int, *, ids: str, request_options: typing.Optional[RequestOptions] = None
|
|
1587
|
+
) -> StatsAgreementAnnotatorsResponse:
|
|
1588
|
+
"""
|
|
1589
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1590
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1591
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1592
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1593
|
+
</p>
|
|
1594
|
+
</Card>
|
|
1595
|
+
Get agreement statistics for multiple annotators within a project.
|
|
1596
|
+
|
|
1597
|
+
Parameters
|
|
1598
|
+
----------
|
|
1599
|
+
id : int
|
|
1600
|
+
|
|
1601
|
+
ids : str
|
|
1602
|
+
Comma separated list of annotator user IDs to get agreement scores for
|
|
1603
|
+
|
|
1604
|
+
request_options : typing.Optional[RequestOptions]
|
|
1605
|
+
Request-specific configuration.
|
|
1606
|
+
|
|
1607
|
+
Returns
|
|
1608
|
+
-------
|
|
1609
|
+
StatsAgreementAnnotatorsResponse
|
|
1610
|
+
Multiple annotator agreement statistics
|
|
1611
|
+
|
|
1612
|
+
Examples
|
|
1613
|
+
--------
|
|
1614
|
+
import asyncio
|
|
1615
|
+
|
|
1616
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
1617
|
+
|
|
1618
|
+
client = AsyncLabelStudio(
|
|
1619
|
+
api_key="YOUR_API_KEY",
|
|
1620
|
+
)
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
async def main() -> None:
|
|
1624
|
+
await client.projects.stats.agreement_annotators(
|
|
1625
|
+
id=1,
|
|
1626
|
+
ids="ids",
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
asyncio.run(main())
|
|
1631
|
+
"""
|
|
1632
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1633
|
+
f"api/projects/{jsonable_encoder(id)}/stats/agreement_annotators",
|
|
1634
|
+
method="GET",
|
|
1635
|
+
params={
|
|
1636
|
+
"ids": ids,
|
|
1637
|
+
},
|
|
1638
|
+
request_options=request_options,
|
|
1639
|
+
)
|
|
1640
|
+
try:
|
|
1641
|
+
if 200 <= _response.status_code < 300:
|
|
1642
|
+
return typing.cast(
|
|
1643
|
+
StatsAgreementAnnotatorsResponse,
|
|
1644
|
+
construct_type(
|
|
1645
|
+
type_=StatsAgreementAnnotatorsResponse, # type: ignore
|
|
1646
|
+
object_=_response.json(),
|
|
1647
|
+
),
|
|
1648
|
+
)
|
|
1649
|
+
_response_json = _response.json()
|
|
1650
|
+
except JSONDecodeError:
|
|
1651
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1652
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1653
|
+
|
|
1208
1654
|
async def data_filters(
|
|
1209
1655
|
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1210
1656
|
) -> StatsDataFiltersResponse:
|
|
1211
1657
|
"""
|
|
1658
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1659
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1660
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1661
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1662
|
+
</p>
|
|
1663
|
+
</Card>
|
|
1212
1664
|
Get statistics about user data filters and their usage within a project.
|
|
1213
1665
|
|
|
1214
1666
|
Parameters
|
|
@@ -1265,6 +1717,12 @@ class AsyncStatsClient:
|
|
|
1265
1717
|
self, id: int, *, user_pk: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
|
|
1266
1718
|
) -> StatsFinishedTasksResponse:
|
|
1267
1719
|
"""
|
|
1720
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1721
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1722
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1723
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1724
|
+
</p>
|
|
1725
|
+
</Card>
|
|
1268
1726
|
Get statistics about finished tasks for a project.
|
|
1269
1727
|
|
|
1270
1728
|
Parameters
|
|
@@ -1327,6 +1785,12 @@ class AsyncStatsClient:
|
|
|
1327
1785
|
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
1328
1786
|
) -> StatsLeadTimeResponse:
|
|
1329
1787
|
"""
|
|
1788
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1789
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1790
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1791
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1792
|
+
</p>
|
|
1793
|
+
</Card>
|
|
1330
1794
|
Get lead time statistics across the project, including average annotation time.
|
|
1331
1795
|
|
|
1332
1796
|
Parameters
|
|
@@ -1461,6 +1925,12 @@ class AsyncStatsClient:
|
|
|
1461
1925
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1462
1926
|
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
1463
1927
|
"""
|
|
1928
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
1929
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
1930
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
1931
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
1932
|
+
</p>
|
|
1933
|
+
</Card>
|
|
1464
1934
|
Start stats recalculation for given project
|
|
1465
1935
|
|
|
1466
1936
|
Parameters
|
|
@@ -1519,6 +1989,162 @@ class AsyncStatsClient:
|
|
|
1519
1989
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1520
1990
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1521
1991
|
|
|
1992
|
+
async def users_prediction_agreement(
|
|
1993
|
+
self,
|
|
1994
|
+
id: int,
|
|
1995
|
+
*,
|
|
1996
|
+
ids: str,
|
|
1997
|
+
per_label: typing.Optional[bool] = None,
|
|
1998
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1999
|
+
) -> StatsUsersPredictionAgreementResponse:
|
|
2000
|
+
"""
|
|
2001
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
2002
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
2003
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
2004
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
2005
|
+
</p>
|
|
2006
|
+
</Card>
|
|
2007
|
+
Get prediction agreement statistics for multiple annotators within a project.
|
|
2008
|
+
|
|
2009
|
+
Parameters
|
|
2010
|
+
----------
|
|
2011
|
+
id : int
|
|
2012
|
+
|
|
2013
|
+
ids : str
|
|
2014
|
+
Comma separated list of annotator user IDs to get agreement scores for
|
|
2015
|
+
|
|
2016
|
+
per_label : typing.Optional[bool]
|
|
2017
|
+
Per label
|
|
2018
|
+
|
|
2019
|
+
request_options : typing.Optional[RequestOptions]
|
|
2020
|
+
Request-specific configuration.
|
|
2021
|
+
|
|
2022
|
+
Returns
|
|
2023
|
+
-------
|
|
2024
|
+
StatsUsersPredictionAgreementResponse
|
|
2025
|
+
Prediction agreement statistics for multiple annotators
|
|
2026
|
+
|
|
2027
|
+
Examples
|
|
2028
|
+
--------
|
|
2029
|
+
import asyncio
|
|
2030
|
+
|
|
2031
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
2032
|
+
|
|
2033
|
+
client = AsyncLabelStudio(
|
|
2034
|
+
api_key="YOUR_API_KEY",
|
|
2035
|
+
)
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
async def main() -> None:
|
|
2039
|
+
await client.projects.stats.users_prediction_agreement(
|
|
2040
|
+
id=1,
|
|
2041
|
+
ids="ids",
|
|
2042
|
+
)
|
|
2043
|
+
|
|
2044
|
+
|
|
2045
|
+
asyncio.run(main())
|
|
2046
|
+
"""
|
|
2047
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
2048
|
+
f"api/projects/{jsonable_encoder(id)}/user-stats/prediction",
|
|
2049
|
+
method="GET",
|
|
2050
|
+
params={
|
|
2051
|
+
"ids": ids,
|
|
2052
|
+
"per_label": per_label,
|
|
2053
|
+
},
|
|
2054
|
+
request_options=request_options,
|
|
2055
|
+
)
|
|
2056
|
+
try:
|
|
2057
|
+
if 200 <= _response.status_code < 300:
|
|
2058
|
+
return typing.cast(
|
|
2059
|
+
StatsUsersPredictionAgreementResponse,
|
|
2060
|
+
construct_type(
|
|
2061
|
+
type_=StatsUsersPredictionAgreementResponse, # type: ignore
|
|
2062
|
+
object_=_response.json(),
|
|
2063
|
+
),
|
|
2064
|
+
)
|
|
2065
|
+
_response_json = _response.json()
|
|
2066
|
+
except JSONDecodeError:
|
|
2067
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2068
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2069
|
+
|
|
2070
|
+
async def users_review_score(
|
|
2071
|
+
self,
|
|
2072
|
+
id: int,
|
|
2073
|
+
*,
|
|
2074
|
+
ids: str,
|
|
2075
|
+
per_label: typing.Optional[bool] = None,
|
|
2076
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
2077
|
+
) -> StatsUsersReviewScoreResponse:
|
|
2078
|
+
"""
|
|
2079
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
2080
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
2081
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
2082
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
2083
|
+
</p>
|
|
2084
|
+
</Card>
|
|
2085
|
+
Get review score and performance score statistics for multiple annotators within a project.
|
|
2086
|
+
|
|
2087
|
+
Parameters
|
|
2088
|
+
----------
|
|
2089
|
+
id : int
|
|
2090
|
+
|
|
2091
|
+
ids : str
|
|
2092
|
+
Comma separated list of annotator user IDs to get review scores for
|
|
2093
|
+
|
|
2094
|
+
per_label : typing.Optional[bool]
|
|
2095
|
+
Per label
|
|
2096
|
+
|
|
2097
|
+
request_options : typing.Optional[RequestOptions]
|
|
2098
|
+
Request-specific configuration.
|
|
2099
|
+
|
|
2100
|
+
Returns
|
|
2101
|
+
-------
|
|
2102
|
+
StatsUsersReviewScoreResponse
|
|
2103
|
+
Review scores and performance scores for multiple annotators
|
|
2104
|
+
|
|
2105
|
+
Examples
|
|
2106
|
+
--------
|
|
2107
|
+
import asyncio
|
|
2108
|
+
|
|
2109
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
2110
|
+
|
|
2111
|
+
client = AsyncLabelStudio(
|
|
2112
|
+
api_key="YOUR_API_KEY",
|
|
2113
|
+
)
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
async def main() -> None:
|
|
2117
|
+
await client.projects.stats.users_review_score(
|
|
2118
|
+
id=1,
|
|
2119
|
+
ids="ids",
|
|
2120
|
+
)
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
asyncio.run(main())
|
|
2124
|
+
"""
|
|
2125
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
2126
|
+
f"api/projects/{jsonable_encoder(id)}/user-stats/review_score",
|
|
2127
|
+
method="GET",
|
|
2128
|
+
params={
|
|
2129
|
+
"ids": ids,
|
|
2130
|
+
"per_label": per_label,
|
|
2131
|
+
},
|
|
2132
|
+
request_options=request_options,
|
|
2133
|
+
)
|
|
2134
|
+
try:
|
|
2135
|
+
if 200 <= _response.status_code < 300:
|
|
2136
|
+
return typing.cast(
|
|
2137
|
+
StatsUsersReviewScoreResponse,
|
|
2138
|
+
construct_type(
|
|
2139
|
+
type_=StatsUsersReviewScoreResponse, # type: ignore
|
|
2140
|
+
object_=_response.json(),
|
|
2141
|
+
),
|
|
2142
|
+
)
|
|
2143
|
+
_response_json = _response.json()
|
|
2144
|
+
except JSONDecodeError:
|
|
2145
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2146
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2147
|
+
|
|
1522
2148
|
async def user_prediction_agreement(
|
|
1523
2149
|
self,
|
|
1524
2150
|
id: int,
|