Skip to content

Commit 8389afa

Browse files
yyassi-heartexrobot-ci-heartex
authored andcommitted
chore: FIT-1729: Member performance: Data Manager links + neutral styling for Fix + Accepted / Rejected
GitOrigin-RevId: e50a0e18abe1d52760691780c8dbde7c0500377f
1 parent c932f52 commit 8389afa

9 files changed

Lines changed: 409 additions & 10 deletions

reference.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34722,7 +34722,7 @@ client.projects.stats.lead_time(
3472234722
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
3472334723
</p>
3472434724
</Card>
34725-
Paginated, sortable member performance rows for annotation/review tables. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
34725+
Paginated, sortable member performance rows for annotation/review tables. Footer totals are returned by <code>member_performance_summary</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
3472634726
</dd>
3472734727
</dl>
3472834728
</dd>
@@ -34819,6 +34819,101 @@ client.projects.stats.member_performance_rows(
3481934819
</dl>
3482034820

3482134821

34822+
</dd>
34823+
</dl>
34824+
</details>
34825+
34826+
<details><summary><code>client.projects.stats.<a href="src/label_studio_sdk/projects/stats/client.py">member_performance_summary</a>(...) -> MemberPerformanceSummaryStatsResponse</code></summary>
34827+
<dl>
34828+
<dd>
34829+
34830+
#### 📝 Description
34831+
34832+
<dl>
34833+
<dd>
34834+
34835+
<dl>
34836+
<dd>
34837+
34838+
<Card href="https://humansignal.com/goenterprise">
34839+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
34840+
<p style="margin-top: 10px; font-size: 14px;">
34841+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
34842+
</p>
34843+
</Card>
34844+
Footer / Total aggregates for member performance tables. Use with paginated <code>member_performance_rows</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
34845+
</dd>
34846+
</dl>
34847+
</dd>
34848+
</dl>
34849+
34850+
#### 🔌 Usage
34851+
34852+
<dl>
34853+
<dd>
34854+
34855+
<dl>
34856+
<dd>
34857+
34858+
```python
34859+
from label_studio_sdk import LabelStudio
34860+
from label_studio_sdk.environment import LabelStudioEnvironment
34861+
34862+
client = LabelStudio(
34863+
api_key="<value>",
34864+
environment=LabelStudioEnvironment.DEFAULT,
34865+
)
34866+
34867+
client.projects.stats.member_performance_summary(
34868+
id=1,
34869+
)
34870+
34871+
```
34872+
</dd>
34873+
</dl>
34874+
</dd>
34875+
</dl>
34876+
34877+
#### ⚙️ Parameters
34878+
34879+
<dl>
34880+
<dd>
34881+
34882+
<dl>
34883+
<dd>
34884+
34885+
**id:** `int`
34886+
34887+
</dd>
34888+
</dl>
34889+
34890+
<dl>
34891+
<dd>
34892+
34893+
**ids:** `typing.Optional[str]` — Comma-separated user IDs. When omitted, members are derived from the project.
34894+
34895+
</dd>
34896+
</dl>
34897+
34898+
<dl>
34899+
<dd>
34900+
34901+
**table:** `typing.Optional[MemberPerformanceSummaryStatsRequestTable]` — Which table: "annotations" or "reviews".
34902+
34903+
</dd>
34904+
</dl>
34905+
34906+
<dl>
34907+
<dd>
34908+
34909+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
34910+
34911+
</dd>
34912+
</dl>
34913+
</dd>
34914+
</dl>
34915+
34916+
3482234917
</dd>
3482334918
</dl>
3482434919
</details>

src/label_studio_sdk/projects/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
LeadTimeStatsResponseLeadTimeStatsItem,
4141
MemberPerformanceRowsStatsRequestTable,
4242
MemberPerformanceRowsStatsResponse,
43+
MemberPerformanceSummaryStatsRequestTable,
44+
MemberPerformanceSummaryStatsResponse,
4345
ModelVersionAnnotatorAgreementStatsResponse,
4446
ModelVersionGroundTruthAgreementStatsResponse,
4547
ModelVersionPredictionAgreementStatsResponse,
@@ -93,6 +95,8 @@
9395
"LeadTimeStatsResponseLeadTimeStatsItem": ".stats",
9496
"MemberPerformanceRowsStatsRequestTable": ".stats",
9597
"MemberPerformanceRowsStatsResponse": ".stats",
98+
"MemberPerformanceSummaryStatsRequestTable": ".stats",
99+
"MemberPerformanceSummaryStatsResponse": ".stats",
96100
"ModelVersionAnnotatorAgreementStatsResponse": ".stats",
97101
"ModelVersionGroundTruthAgreementStatsResponse": ".stats",
98102
"ModelVersionPredictionAgreementStatsResponse": ".stats",
@@ -178,6 +182,8 @@ def __dir__():
178182
"LeadTimeStatsResponseLeadTimeStatsItem",
179183
"MemberPerformanceRowsStatsRequestTable",
180184
"MemberPerformanceRowsStatsResponse",
185+
"MemberPerformanceSummaryStatsRequestTable",
186+
"MemberPerformanceSummaryStatsResponse",
181187
"ModelVersionAnnotatorAgreementStatsResponse",
182188
"ModelVersionGroundTruthAgreementStatsResponse",
183189
"ModelVersionPredictionAgreementStatsResponse",

src/label_studio_sdk/projects/stats/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
LeadTimeStatsResponseLeadTimeStatsItem,
2222
MemberPerformanceRowsStatsRequestTable,
2323
MemberPerformanceRowsStatsResponse,
24+
MemberPerformanceSummaryStatsRequestTable,
25+
MemberPerformanceSummaryStatsResponse,
2426
ModelVersionAnnotatorAgreementStatsResponse,
2527
ModelVersionGroundTruthAgreementStatsResponse,
2628
ModelVersionPredictionAgreementStatsResponse,
@@ -57,6 +59,8 @@
5759
"LeadTimeStatsResponseLeadTimeStatsItem": ".types",
5860
"MemberPerformanceRowsStatsRequestTable": ".types",
5961
"MemberPerformanceRowsStatsResponse": ".types",
62+
"MemberPerformanceSummaryStatsRequestTable": ".types",
63+
"MemberPerformanceSummaryStatsResponse": ".types",
6064
"ModelVersionAnnotatorAgreementStatsResponse": ".types",
6165
"ModelVersionGroundTruthAgreementStatsResponse": ".types",
6266
"ModelVersionPredictionAgreementStatsResponse": ".types",
@@ -116,6 +120,8 @@ def __dir__():
116120
"LeadTimeStatsResponseLeadTimeStatsItem",
117121
"MemberPerformanceRowsStatsRequestTable",
118122
"MemberPerformanceRowsStatsResponse",
123+
"MemberPerformanceSummaryStatsRequestTable",
124+
"MemberPerformanceSummaryStatsResponse",
119125
"ModelVersionAnnotatorAgreementStatsResponse",
120126
"ModelVersionGroundTruthAgreementStatsResponse",
121127
"ModelVersionPredictionAgreementStatsResponse",

src/label_studio_sdk/projects/stats/client.py

Lines changed: 116 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
from .types.lead_time_stats_response import LeadTimeStatsResponse
1616
from .types.member_performance_rows_stats_request_table import MemberPerformanceRowsStatsRequestTable
1717
from .types.member_performance_rows_stats_response import MemberPerformanceRowsStatsResponse
18+
from .types.member_performance_summary_stats_request_table import MemberPerformanceSummaryStatsRequestTable
19+
from .types.member_performance_summary_stats_response import MemberPerformanceSummaryStatsResponse
1820
from .types.model_version_annotator_agreement_stats_response import ModelVersionAnnotatorAgreementStatsResponse
1921
from .types.model_version_ground_truth_agreement_stats_response import ModelVersionGroundTruthAgreementStatsResponse
2022
from .types.model_version_prediction_agreement_stats_response import ModelVersionPredictionAgreementStatsResponse
@@ -607,7 +609,7 @@ def member_performance_rows(
607609
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
608610
</p>
609611
</Card>
610-
Paginated, sortable member performance rows for annotation/review tables. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
612+
Paginated, sortable member performance rows for annotation/review tables. Footer totals are returned by <code>member_performance_summary</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
611613
612614
Parameters
613615
----------
@@ -634,7 +636,7 @@ def member_performance_rows(
634636
Returns
635637
-------
636638
MemberPerformanceRowsStatsResponse
637-
Member performance rows for one page plus summary aggregates.
639+
Member performance rows for one page (summary aggregates via member_performance_summary).
638640
639641
Examples
640642
--------
@@ -652,6 +654,57 @@ def member_performance_rows(
652654
)
653655
return _response.data
654656

657+
def member_performance_summary(
658+
self,
659+
id: int,
660+
*,
661+
ids: typing.Optional[str] = None,
662+
table: typing.Optional[MemberPerformanceSummaryStatsRequestTable] = None,
663+
request_options: typing.Optional[RequestOptions] = None,
664+
) -> MemberPerformanceSummaryStatsResponse:
665+
"""
666+
<Card href="https://humansignal.com/goenterprise">
667+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
668+
<p style="margin-top: 10px; font-size: 14px;">
669+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
670+
</p>
671+
</Card>
672+
Footer / Total aggregates for member performance tables. Use with paginated <code>member_performance_rows</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
673+
674+
Parameters
675+
----------
676+
id : int
677+
678+
ids : typing.Optional[str]
679+
Comma-separated user IDs. When omitted, members are derived from the project.
680+
681+
table : typing.Optional[MemberPerformanceSummaryStatsRequestTable]
682+
Which table: "annotations" or "reviews".
683+
684+
request_options : typing.Optional[RequestOptions]
685+
Request-specific configuration.
686+
687+
Returns
688+
-------
689+
MemberPerformanceSummaryStatsResponse
690+
Summary aggregates (avg_*, sum_*, count_paused).
691+
692+
Examples
693+
--------
694+
from label_studio_sdk import LabelStudio
695+
696+
client = LabelStudio(
697+
api_key="YOUR_API_KEY",
698+
)
699+
client.projects.stats.member_performance_summary(
700+
id=1,
701+
)
702+
"""
703+
_response = self._raw_client.member_performance_summary(
704+
id, ids=ids, table=table, request_options=request_options
705+
)
706+
return _response.data
707+
655708
def total_agreement(
656709
self,
657710
id: int,
@@ -1680,7 +1733,7 @@ async def member_performance_rows(
16801733
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
16811734
</p>
16821735
</Card>
1683-
Paginated, sortable member performance rows for annotation/review tables. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
1736+
Paginated, sortable member performance rows for annotation/review tables. Footer totals are returned by <code>member_performance_summary</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
16841737
16851738
Parameters
16861739
----------
@@ -1707,7 +1760,7 @@ async def member_performance_rows(
17071760
Returns
17081761
-------
17091762
MemberPerformanceRowsStatsResponse
1710-
Member performance rows for one page plus summary aggregates.
1763+
Member performance rows for one page (summary aggregates via member_performance_summary).
17111764
17121765
Examples
17131766
--------
@@ -1733,6 +1786,65 @@ async def main() -> None:
17331786
)
17341787
return _response.data
17351788

1789+
async def member_performance_summary(
1790+
self,
1791+
id: int,
1792+
*,
1793+
ids: typing.Optional[str] = None,
1794+
table: typing.Optional[MemberPerformanceSummaryStatsRequestTable] = None,
1795+
request_options: typing.Optional[RequestOptions] = None,
1796+
) -> MemberPerformanceSummaryStatsResponse:
1797+
"""
1798+
<Card href="https://humansignal.com/goenterprise">
1799+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
1800+
<p style="margin-top: 10px; font-size: 14px;">
1801+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
1802+
</p>
1803+
</Card>
1804+
Footer / Total aggregates for member performance tables. Use with paginated <code>member_performance_rows</code>. Guarded by <code>fflag_feat_lse_project_dashboards_v3_members_short</code>.
1805+
1806+
Parameters
1807+
----------
1808+
id : int
1809+
1810+
ids : typing.Optional[str]
1811+
Comma-separated user IDs. When omitted, members are derived from the project.
1812+
1813+
table : typing.Optional[MemberPerformanceSummaryStatsRequestTable]
1814+
Which table: "annotations" or "reviews".
1815+
1816+
request_options : typing.Optional[RequestOptions]
1817+
Request-specific configuration.
1818+
1819+
Returns
1820+
-------
1821+
MemberPerformanceSummaryStatsResponse
1822+
Summary aggregates (avg_*, sum_*, count_paused).
1823+
1824+
Examples
1825+
--------
1826+
import asyncio
1827+
1828+
from label_studio_sdk import AsyncLabelStudio
1829+
1830+
client = AsyncLabelStudio(
1831+
api_key="YOUR_API_KEY",
1832+
)
1833+
1834+
1835+
async def main() -> None:
1836+
await client.projects.stats.member_performance_summary(
1837+
id=1,
1838+
)
1839+
1840+
1841+
asyncio.run(main())
1842+
"""
1843+
_response = await self._raw_client.member_performance_summary(
1844+
id, ids=ids, table=table, request_options=request_options
1845+
)
1846+
return _response.data
1847+
17361848
async def total_agreement(
17371849
self,
17381850
id: int,

0 commit comments

Comments
 (0)