Skip to content

Commit 27ce09b

Browse files
Merge remote-tracking branch 'origin/master' into fb-ROOT-73
2 parents 87814b8 + f0e224b commit 27ce09b

File tree

8 files changed

+322
-337
lines changed

8 files changed

+322
-337
lines changed

.mock/openapi/openapi.yaml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7335,74 +7335,6 @@ paths:
73357335
summary: Get project members paginated
73367336
tags:
73377337
- Projects
7338-
/api/projects/{id}/metricparam/:
7339-
get:
7340-
description: Get the current metrics configuration for a project.
7341-
operationId: api_projects_metricparam_retrieve
7342-
parameters:
7343-
- in: path
7344-
name: id
7345-
required: true
7346-
schema:
7347-
type: integer
7348-
responses:
7349-
'200':
7350-
content:
7351-
application/json:
7352-
schema:
7353-
$ref: '#/components/schemas/MetricParam'
7354-
description: Current metrics configuration
7355-
security:
7356-
- Token: []
7357-
summary: Get project metrics configuration
7358-
tags:
7359-
- Projects
7360-
x-fern-audiences:
7361-
- public
7362-
x-fern-sdk-group-name:
7363-
- projects
7364-
- metrics
7365-
x-fern-sdk-method-name: get
7366-
post:
7367-
description: Update metrics strategy and parameters for a project.
7368-
operationId: api_projects_metricparam_create
7369-
parameters:
7370-
- in: path
7371-
name: id
7372-
required: true
7373-
schema:
7374-
type: integer
7375-
requestBody:
7376-
content:
7377-
application/json:
7378-
schema:
7379-
$ref: '#/components/schemas/ProjectMetricParamUpdateRequest'
7380-
application/x-www-form-urlencoded:
7381-
schema:
7382-
$ref: '#/components/schemas/ProjectMetricParamUpdateRequest'
7383-
multipart/form-data:
7384-
schema:
7385-
$ref: '#/components/schemas/ProjectMetricParamUpdateRequest'
7386-
responses:
7387-
'200':
7388-
content:
7389-
application/json:
7390-
schema:
7391-
$ref: '#/components/schemas/MetricParam'
7392-
description: Updated metrics configuration
7393-
'204':
7394-
description: No params provided to update
7395-
security:
7396-
- Token: []
7397-
summary: Update project metrics configuration
7398-
tags:
7399-
- Projects
7400-
x-fern-audiences:
7401-
- public
7402-
x-fern-sdk-group-name:
7403-
- projects
7404-
- metrics
7405-
x-fern-sdk-method-name: update
74067338
/api/projects/{id}/project-extra-params/:
74077339
get:
74087340
description: Retrieve the annotator weights for statistics and Cohen's Kappa for a specific project.

reference.md

Lines changed: 0 additions & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -20344,179 +20344,6 @@ client.projects.members.get(
2034420344
</dl>
2034520345

2034620346

20347-
</dd>
20348-
</dl>
20349-
</details>
20350-
20351-
## Projects Metrics
20352-
<details><summary><code>client.projects.metrics.<a href="src/label_studio_sdk/projects/metrics/client.py">get</a>(...)</code></summary>
20353-
<dl>
20354-
<dd>
20355-
20356-
#### 📝 Description
20357-
20358-
<dl>
20359-
<dd>
20360-
20361-
<dl>
20362-
<dd>
20363-
20364-
Get the current metrics configuration for a project.
20365-
</dd>
20366-
</dl>
20367-
</dd>
20368-
</dl>
20369-
20370-
#### 🔌 Usage
20371-
20372-
<dl>
20373-
<dd>
20374-
20375-
<dl>
20376-
<dd>
20377-
20378-
```python
20379-
from label_studio_sdk import LabelStudio
20380-
20381-
client = LabelStudio(
20382-
api_key="YOUR_API_KEY",
20383-
)
20384-
client.projects.metrics.get(
20385-
id=1,
20386-
)
20387-
20388-
```
20389-
</dd>
20390-
</dl>
20391-
</dd>
20392-
</dl>
20393-
20394-
#### ⚙️ Parameters
20395-
20396-
<dl>
20397-
<dd>
20398-
20399-
<dl>
20400-
<dd>
20401-
20402-
**id:** `int`
20403-
20404-
</dd>
20405-
</dl>
20406-
20407-
<dl>
20408-
<dd>
20409-
20410-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
20411-
20412-
</dd>
20413-
</dl>
20414-
</dd>
20415-
</dl>
20416-
20417-
20418-
</dd>
20419-
</dl>
20420-
</details>
20421-
20422-
<details><summary><code>client.projects.metrics.<a href="src/label_studio_sdk/projects/metrics/client.py">update</a>(...)</code></summary>
20423-
<dl>
20424-
<dd>
20425-
20426-
#### 📝 Description
20427-
20428-
<dl>
20429-
<dd>
20430-
20431-
<dl>
20432-
<dd>
20433-
20434-
Update metrics strategy and parameters for a project.
20435-
</dd>
20436-
</dl>
20437-
</dd>
20438-
</dl>
20439-
20440-
#### 🔌 Usage
20441-
20442-
<dl>
20443-
<dd>
20444-
20445-
<dl>
20446-
<dd>
20447-
20448-
```python
20449-
from label_studio_sdk import LabelStudio
20450-
20451-
client = LabelStudio(
20452-
api_key="YOUR_API_KEY",
20453-
)
20454-
client.projects.metrics.update(
20455-
id=1,
20456-
)
20457-
20458-
```
20459-
</dd>
20460-
</dl>
20461-
</dd>
20462-
</dl>
20463-
20464-
#### ⚙️ Parameters
20465-
20466-
<dl>
20467-
<dd>
20468-
20469-
<dl>
20470-
<dd>
20471-
20472-
**id:** `int`
20473-
20474-
</dd>
20475-
</dl>
20476-
20477-
<dl>
20478-
<dd>
20479-
20480-
**additional_params:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]`
20481-
20482-
</dd>
20483-
</dl>
20484-
20485-
<dl>
20486-
<dd>
20487-
20488-
**agreement_threshold:** `typing.Optional[int]`
20489-
20490-
</dd>
20491-
</dl>
20492-
20493-
<dl>
20494-
<dd>
20495-
20496-
**max_additional_annotators_assignable:** `typing.Optional[int]`
20497-
20498-
</dd>
20499-
</dl>
20500-
20501-
<dl>
20502-
<dd>
20503-
20504-
**metric_name:** `typing.Optional[str]`
20505-
20506-
</dd>
20507-
</dl>
20508-
20509-
<dl>
20510-
<dd>
20511-
20512-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
20513-
20514-
</dd>
20515-
</dl>
20516-
</dd>
20517-
</dl>
20518-
20519-
2052020347
</dd>
2052120348
</dl>
2052220349
</details>
@@ -20620,86 +20447,6 @@ client.projects.stats.iaa(
2062020447
</dl>
2062120448

2062220449

20623-
</dd>
20624-
</dl>
20625-
</details>
20626-
20627-
<details><summary><code>client.projects.stats.<a href="src/label_studio_sdk/projects/stats/client.py">total_agreement</a>(...)</code></summary>
20628-
<dl>
20629-
<dd>
20630-
20631-
#### 📝 Description
20632-
20633-
<dl>
20634-
<dd>
20635-
20636-
<dl>
20637-
<dd>
20638-
20639-
Overall or per-label total agreement across the project.
20640-
20641-
NOTE: due to an open issue in Fern, SDK clients will raise ApiError upon handling a 204 response. As a workaround, wrap call to this function in a try-except block.
20642-
</dd>
20643-
</dl>
20644-
</dd>
20645-
</dl>
20646-
20647-
#### 🔌 Usage
20648-
20649-
<dl>
20650-
<dd>
20651-
20652-
<dl>
20653-
<dd>
20654-
20655-
```python
20656-
from label_studio_sdk import LabelStudio
20657-
20658-
client = LabelStudio(
20659-
api_key="YOUR_API_KEY",
20660-
)
20661-
client.projects.stats.total_agreement(
20662-
id=1,
20663-
)
20664-
20665-
```
20666-
</dd>
20667-
</dl>
20668-
</dd>
20669-
</dl>
20670-
20671-
#### ⚙️ Parameters
20672-
20673-
<dl>
20674-
<dd>
20675-
20676-
<dl>
20677-
<dd>
20678-
20679-
**id:** `int`
20680-
20681-
</dd>
20682-
</dl>
20683-
20684-
<dl>
20685-
<dd>
20686-
20687-
**per_label:** `typing.Optional[bool]` — Return agreement per label
20688-
20689-
</dd>
20690-
</dl>
20691-
20692-
<dl>
20693-
<dd>
20694-
20695-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
20696-
20697-
</dd>
20698-
</dl>
20699-
</dd>
20700-
</dl>
20701-
20702-
2070320450
</dd>
2070420451
</dl>
2070520452
</details>

src/label_studio_sdk/label_interface/interface.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,6 @@ def _validate_object_logic(self, obj) -> List[str]:
762762
errors.append(f"'{RESULT_KEY}' must be a list")
763763
return errors
764764

765-
if not result:
766-
errors.append(f"'{RESULT_KEY}' cannot be empty")
767-
return errors
768-
769765
# Validate score if present
770766
if 'score' in obj:
771767
score = obj['score']

src/label_studio_sdk/projects/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ProjectsImportTasksResponse,
1010
ProjectsListRequestFilter,
1111
)
12-
from . import assignments, exports, members, metrics, pauses, stats
12+
from . import assignments, exports, members, pauses, stats
1313
from .assignments import (
1414
AssignmentsAssignRequestType,
1515
AssignmentsBulkAssignRequestFilters,
@@ -64,13 +64,9 @@
6464
"StatsIaaResponseCommonTasks",
6565
"StatsIaaResponseIaa",
6666
"StatsIaaResponseStd",
67-
"StatsTotalAgreementResponse",
68-
"StatsTotalAgreementResponseOne",
69-
"StatsTotalAgreementResponseZero",
7067
"assignments",
7168
"exports",
7269
"members",
73-
"metrics",
7470
"pauses",
7571
"stats",
7672
]

0 commit comments

Comments
 (0)