diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index dd0ffd77d..7b7b6c00e 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -165,7 +165,7 @@ types: AllRolesProjectListSampling: discriminated: false union: - - SamplingEnum + - SamplingDe5Enum - NullEnum source: openapi: openapi/openapi.yaml @@ -885,6 +885,9 @@ types: project: type: integer docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the container content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -961,6 +964,9 @@ types: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the container content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -1034,6 +1040,9 @@ types: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the container content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -2418,6 +2427,9 @@ types: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -2491,6 +2503,9 @@ types: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -2627,6 +2642,9 @@ types: project: type: integer docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -2857,6 +2875,9 @@ types: project: type: integer docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -2936,6 +2957,9 @@ types: project: type: integer docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -3323,6 +3347,9 @@ types: project: type: integer docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the directory content regex_filter: type: optional docs: Regex for filtering objects @@ -3657,7 +3684,7 @@ types: LseProjectSampling: discriminated: false union: - - SamplingEnum + - SamplingDe5Enum - NullEnum source: openapi: openapi/openapi.yaml @@ -3892,7 +3919,7 @@ types: LseProjectCreateSampling: discriminated: false union: - - SamplingEnum + - SamplingDe5Enum - NullEnum source: openapi: openapi/openapi.yaml @@ -4055,7 +4082,7 @@ types: LseProjectUpdateSampling: discriminated: false union: - - SamplingEnum + - SamplingDe5Enum - NullEnum source: openapi: openapi/openapi.yaml @@ -6108,7 +6135,7 @@ types: ProjectSampling: discriminated: false union: - - SamplingEnum + - SamplingDe5Enum - NullEnum source: openapi: openapi/openapi.yaml @@ -6796,6 +6823,20 @@ types: source: openapi: openapi/openapi.yaml inline: true + ReviewSettingsSampling: + discriminated: false + docs: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + union: + - ReviewSettingsSamplingEnum + - BlankEnum + - NullEnum + source: + openapi: openapi/openapi.yaml + inline: true ReviewSettings: properties: anonymize_annotations: @@ -6831,6 +6872,18 @@ types: review_only_manual_assignments: type: optional docs: When set True, review queue is built only from manually assigned tasks + review_task_limit_percent: + type: optional + docs: Percent of tasks to include in review stream (0-100). Null/0 disables. + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + sampling: + type: optional + docs: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random show_agreement_to_reviewers: type: optional docs: Show the agreement column to reviewers @@ -6875,6 +6928,20 @@ types: source: openapi: openapi/openapi.yaml inline: true + ReviewSettingsRequestSampling: + discriminated: false + docs: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + union: + - ReviewSettingsSamplingEnum + - BlankEnum + - NullEnum + source: + openapi: openapi/openapi.yaml + inline: true ReviewSettingsRequest: properties: anonymize_annotations: @@ -6908,6 +6975,18 @@ types: review_only_manual_assignments: type: optional docs: When set True, review queue is built only from manually assigned tasks + review_task_limit_percent: + type: optional + docs: Percent of tasks to include in review stream (0-100). Null/0 disables. + validation: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + sampling: + type: optional + docs: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random show_agreement_to_reviewers: type: optional docs: Show the agreement column to reviewers @@ -6924,6 +7003,15 @@ types: false, hides columns not referenced by the label interface source: openapi: openapi/openapi.yaml + ReviewSettingsSamplingEnum: + enum: + - task_id + - random + docs: |- + * `task_id` - By Task ID + * `random` - Random + source: + openapi: openapi/openapi.yaml ReviewedEnum: enum: - only @@ -7317,7 +7405,7 @@ types: workspaces_groups: optional>> source: openapi: openapi/openapi.yaml - SamplingEnum: + SamplingDe5Enum: enum: - value: Sequential sampling name: SequentialSampling diff --git a/.mock/definition/datasetStorageAzure.yml b/.mock/definition/datasetStorageAzure.yml index bc4b08991..d2641c526 100644 --- a/.mock/definition/datasetStorageAzure.yml +++ b/.mock/definition/datasetStorageAzure.yml @@ -44,6 +44,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -90,6 +91,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -138,6 +140,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -184,6 +187,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -229,6 +233,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -313,6 +318,9 @@ service: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the container content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -361,6 +369,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -426,6 +435,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true diff --git a/.mock/definition/datasetStorageGcs.yml b/.mock/definition/datasetStorageGcs.yml index dae91abf1..a4b70d5c0 100644 --- a/.mock/definition/datasetStorageGcs.yml +++ b/.mock/definition/datasetStorageGcs.yml @@ -44,6 +44,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -90,6 +91,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -138,6 +140,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -184,6 +187,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -229,6 +233,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -313,6 +318,9 @@ service: validation: min: 0 max: 32767 + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -361,6 +369,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true @@ -426,6 +435,7 @@ service: prefix: prefix presign: true presign_ttl: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synced: true diff --git a/.mock/definition/importStorage/azure.yml b/.mock/definition/importStorage/azure.yml index d70c13ee8..cadeca972 100644 --- a/.mock/definition/importStorage/azure.yml +++ b/.mock/definition/importStorage/azure.yml @@ -42,6 +42,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -130,6 +131,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -236,6 +238,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -343,6 +346,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -387,6 +391,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true diff --git a/.mock/definition/importStorage/gcs.yml b/.mock/definition/importStorage/gcs.yml index 088f6a655..bfc71e315 100644 --- a/.mock/definition/importStorage/gcs.yml +++ b/.mock/definition/importStorage/gcs.yml @@ -42,6 +42,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -133,6 +134,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -242,6 +244,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -352,6 +355,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -396,6 +400,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true diff --git a/.mock/definition/importStorage/gcswif.yml b/.mock/definition/importStorage/gcswif.yml index 39e1762b3..14e417892 100644 --- a/.mock/definition/importStorage/gcswif.yml +++ b/.mock/definition/importStorage/gcswif.yml @@ -48,6 +48,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -95,6 +96,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -159,6 +161,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -255,6 +258,9 @@ service: project: type: optional docs: A unique integer value identifying this project. + recursive_scan: + type: optional + docs: Perform recursive scan over the bucket content regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -302,6 +308,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -350,6 +357,7 @@ service: presign: true presign_ttl: 1 project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true diff --git a/.mock/definition/importStorage/local.yml b/.mock/definition/importStorage/local.yml index 0eb37cbed..0d654969c 100644 --- a/.mock/definition/importStorage/local.yml +++ b/.mock/definition/importStorage/local.yml @@ -37,6 +37,7 @@ service: key: value path: path project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -101,6 +102,7 @@ service: key: value path: path project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -183,6 +185,7 @@ service: key: value path: path project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -266,6 +269,7 @@ service: key: value path: path project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -305,6 +309,7 @@ service: key: value path: path project: 1 + recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true diff --git a/.mock/definition/projectTemplates.yml b/.mock/definition/projectTemplates.yml index 3f83a55b7..3aa660ed1 100644 --- a/.mock/definition/projectTemplates.yml +++ b/.mock/definition/projectTemplates.yml @@ -357,6 +357,8 @@ service: require_comment_on_reject: true review_criteria: all review_only_manual_assignments: true + review_task_limit_percent: review_task_limit_percent + sampling: task_id show_agreement_to_reviewers: true show_data_manager_to_reviewers: true show_instruction: true diff --git a/.mock/definition/projects.yml b/.mock/definition/projects.yml index be3dac50c..99b2ae3fb 100644 --- a/.mock/definition/projects.yml +++ b/.mock/definition/projects.yml @@ -9,7 +9,7 @@ types: LseProjectCreateRequestSampling: discriminated: false union: - - root.SamplingEnum + - root.SamplingDe5Enum - root.NullEnum source: openapi: openapi/openapi.yaml @@ -25,7 +25,7 @@ types: PatchedLseProjectUpdateRequestSampling: discriminated: false union: - - root.SamplingEnum + - root.SamplingDe5Enum - root.NullEnum source: openapi: openapi/openapi.yaml @@ -814,6 +814,8 @@ service: require_comment_on_reject: true review_criteria: all review_only_manual_assignments: true + review_task_limit_percent: review_task_limit_percent + sampling: task_id show_agreement_to_reviewers: true show_data_manager_to_reviewers: true show_instruction: true @@ -840,6 +842,33 @@ service: workspace_title: workspace_title audiences: - public + list_unique_annotators: + path: /api/projects/{id}/annotators/ + method: GET + auth: true + docs: >- + Return unique users who have submitted annotations in the specified + project. + source: + openapi: openapi/openapi.yaml + path-parameters: + id: integer + display-name: List unique annotators for project + response: + docs: List of annotator users + type: list + examples: + - path-parameters: + id: 1 + response: + body: + - avatar: avatar + email: email + first_name: first_name + id: 1 + last_name: last_name + audiences: + - public duplicate: path: /api/projects/{id}/duplicate/ method: POST diff --git a/.mock/definition/workspaces.yml b/.mock/definition/workspaces.yml index a5a3bee8c..06c79e9d3 100644 --- a/.mock/definition/workspaces.yml +++ b/.mock/definition/workspaces.yml @@ -447,7 +447,7 @@ types: ProjectRequestSampling: discriminated: false union: - - root.SamplingEnum + - root.SamplingDe5Enum - root.NullEnum source: openapi: openapi/openapi.yaml diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 81cf61632..e307b80a6 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -6899,6 +6899,34 @@ paths: - public x-fern-sdk-group-name: annotation_history x-fern-sdk-method-name: list_for_project + /api/projects/{id}/annotators/: + get: + description: Return unique users who have submitted annotations in the specified project. + operationId: api_projects_annotators_retrieve + parameters: + - in: path + name: id + required: true + schema: + type: integer + responses: + '200': + content: + application/json: + schema: + items: + $ref: '#/components/schemas/UserSimple' + type: array + description: List of annotator users + security: + - Token: [] + summary: List unique annotators for project + tags: + - Projects + x-fern-audiences: + - public + x-fern-sdk-group-name: projects + x-fern-sdk-method-name: list_unique_annotators /api/projects/{id}/aws-custom-function: get: description: Get the AWS Lambda code for the custom metric configured for this project. @@ -17745,7 +17773,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -18541,6 +18569,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the container content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -18641,6 +18673,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the container content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -18732,6 +18768,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the container content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -20675,6 +20715,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -20766,6 +20810,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -20940,6 +20988,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -21241,6 +21293,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -21341,6 +21397,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -21930,6 +21990,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the directory content + nullable: true + type: boolean regex_filter: description: Regex for filtering objects nullable: true @@ -22473,7 +22537,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -22753,7 +22817,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -22911,7 +22975,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -23117,7 +23181,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -25840,6 +25904,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the container content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -26428,6 +26496,10 @@ components: maximum: 32767 minimum: 0 type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -26609,6 +26681,10 @@ components: project: description: A unique integer value identifying this project. type: integer + recursive_scan: + description: Perform recursive scan over the bucket content + nullable: true + type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -26848,7 +26924,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -27913,7 +27989,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -28319,7 +28395,7 @@ components: sampling: nullable: true oneOf: - - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/SamplingDe5Enum' - $ref: '#/components/schemas/NullEnum' show_annotation_history: description: Show annotation history to annotator @@ -28922,6 +28998,23 @@ components: review_only_manual_assignments: description: When set True, review queue is built only from manually assigned tasks type: boolean + review_task_limit_percent: + description: Percent of tasks to include in review stream (0-100). Null/0 disables. + format: decimal + nullable: true + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + type: string + sampling: + description: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + nullable: true + oneOf: + - $ref: '#/components/schemas/ReviewSettingsSamplingEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' show_agreement_to_reviewers: description: Show the agreement column to reviewers type: boolean @@ -28982,6 +29075,23 @@ components: review_only_manual_assignments: description: When set True, review queue is built only from manually assigned tasks type: boolean + review_task_limit_percent: + description: Percent of tasks to include in review stream (0-100). Null/0 disables. + format: decimal + nullable: true + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + type: string + sampling: + description: |- + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + nullable: true + oneOf: + - $ref: '#/components/schemas/ReviewSettingsSamplingEnum' + - $ref: '#/components/schemas/BlankEnum' + - $ref: '#/components/schemas/NullEnum' show_agreement_to_reviewers: description: Show the agreement column to reviewers type: boolean @@ -28996,6 +29106,14 @@ components: nullable: true type: boolean type: object + ReviewSettingsSamplingEnum: + description: |- + * `task_id` - By Task ID + * `random` - Random + enum: + - task_id + - random + type: string ReviewedEnum: description: |- * `only` - only @@ -29525,7 +29643,7 @@ components: type: array type: array type: object - SamplingEnum: + SamplingDe5Enum: description: |- * `Sequential sampling` - Tasks are ordered by Data manager ordering * `Uniform sampling` - Tasks are chosen randomly diff --git a/reference.md b/reference.md index bb1a2e435..7f3ddf61b 100644 --- a/reference.md +++ b/reference.md @@ -9636,6 +9636,76 @@ client.projects.update( + + + + +
client.projects.list_unique_annotators(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Return unique users who have submitted annotations in the specified project. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from label_studio_sdk import LabelStudio + +client = LabelStudio( + api_key="YOUR_API_KEY", +) +client.projects.list_unique_annotators( + id=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `int` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ +
@@ -23972,6 +24042,14 @@ client.import_storage.gcswif.create(
+**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content + +
+
+ +
+
+ **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
@@ -24210,6 +24288,14 @@ client.import_storage.gcswif.validate(
+**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content + +
+
+ +
+
+ **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
@@ -24596,6 +24682,14 @@ client.import_storage.gcswif.update(
+**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan over the bucket content + +
+
+ +
+
+ **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
diff --git a/src/label_studio_sdk/__init__.py b/src/label_studio_sdk/__init__.py index 28d451aaa..cc6a8774d 100644 --- a/src/label_studio_sdk/__init__.py +++ b/src/label_studio_sdk/__init__.py @@ -187,8 +187,11 @@ ReviewSettingsRequest, ReviewSettingsRequestRequeueRejectedTasksMode, ReviewSettingsRequestReviewCriteria, + ReviewSettingsRequestSampling, ReviewSettingsRequeueRejectedTasksMode, ReviewSettingsReviewCriteria, + ReviewSettingsSampling, + ReviewSettingsSamplingEnum, ReviewedEnum, Role9E7Enum, RoleBasedTask, @@ -196,7 +199,7 @@ S3ImportStorage, SamlSettings, SamlSettingsUpdate, - SamplingEnum, + SamplingDe5Enum, ScimSettings, ScimSettingsUpdate, ScopeEnum, @@ -577,8 +580,11 @@ "ReviewSettingsRequest", "ReviewSettingsRequestRequeueRejectedTasksMode", "ReviewSettingsRequestReviewCriteria", + "ReviewSettingsRequestSampling", "ReviewSettingsRequeueRejectedTasksMode", "ReviewSettingsReviewCriteria", + "ReviewSettingsSampling", + "ReviewSettingsSamplingEnum", "ReviewedEnum", "Role9E7Enum", "RoleBasedTask", @@ -586,7 +592,7 @@ "S3ImportStorage", "SamlSettings", "SamlSettingsUpdate", - "SamplingEnum", + "SamplingDe5Enum", "ScimSettings", "ScimSettingsUpdate", "ScopeEnum", diff --git a/src/label_studio_sdk/import_storage/gcswif/client.py b/src/label_studio_sdk/import_storage/gcswif/client.py index 9fd522546..09a181e78 100644 --- a/src/label_studio_sdk/import_storage/gcswif/client.py +++ b/src/label_studio_sdk/import_storage/gcswif/client.py @@ -97,6 +97,7 @@ def create( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -156,6 +157,9 @@ def create( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -211,6 +215,7 @@ def create( "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -254,6 +259,7 @@ def validate( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -313,6 +319,9 @@ def validate( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -367,6 +376,7 @@ def validate( "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -490,6 +500,7 @@ def update( presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -551,6 +562,9 @@ def update( project : typing.Optional[int] A unique integer value identifying this project. + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -606,6 +620,7 @@ def update( "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -769,6 +784,7 @@ async def create( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -828,6 +844,9 @@ async def create( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -891,6 +910,7 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -934,6 +954,7 @@ async def validate( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -993,6 +1014,9 @@ async def validate( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -1055,6 +1079,7 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -1194,6 +1219,7 @@ async def update( presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, project: typing.Optional[int] = OMIT, + recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -1255,6 +1281,9 @@ async def update( project : typing.Optional[int] A unique integer value identifying this project. + recursive_scan : typing.Optional[bool] + Perform recursive scan over the bucket content + regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -1318,6 +1347,7 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, + "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, diff --git a/src/label_studio_sdk/projects/client.py b/src/label_studio_sdk/projects/client.py index 953cf22bd..8a403acbb 100644 --- a/src/label_studio_sdk/projects/client.py +++ b/src/label_studio_sdk/projects/client.py @@ -30,6 +30,7 @@ from .types.patched_lse_project_update_request_sampling import PatchedLseProjectUpdateRequestSampling from .types.patched_lse_project_update_request_skip_queue import PatchedLseProjectUpdateRequestSkipQueue from ..types.lse_project_update import LseProjectUpdate +from ..types.user_simple import UserSimple from ..types.mode_enum import ModeEnum from .types.projects_duplicate_response import ProjectsDuplicateResponse from ..types.import_api_request import ImportApiRequest @@ -799,6 +800,54 @@ def update( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def list_unique_annotators( + self, id: int, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[UserSimple]: + """ + Return unique users who have submitted annotations in the specified project. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[UserSimple] + List of annotator users + + Examples + -------- + from label_studio_sdk import LabelStudio + + client = LabelStudio( + api_key="YOUR_API_KEY", + ) + client.projects.list_unique_annotators( + id=1, + ) + """ + _response = self._client_wrapper.httpx_client.request( + f"api/projects/{jsonable_encoder(id)}/annotators/", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[UserSimple], + construct_type( + type_=typing.List[UserSimple], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def duplicate( self, id: int, @@ -1949,6 +1998,62 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def list_unique_annotators( + self, id: int, *, request_options: typing.Optional[RequestOptions] = None + ) -> typing.List[UserSimple]: + """ + Return unique users who have submitted annotations in the specified project. + + Parameters + ---------- + id : int + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + typing.List[UserSimple] + List of annotator users + + Examples + -------- + import asyncio + + from label_studio_sdk import AsyncLabelStudio + + client = AsyncLabelStudio( + api_key="YOUR_API_KEY", + ) + + + async def main() -> None: + await client.projects.list_unique_annotators( + id=1, + ) + + + asyncio.run(main()) + """ + _response = await self._client_wrapper.httpx_client.request( + f"api/projects/{jsonable_encoder(id)}/annotators/", + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return typing.cast( + typing.List[UserSimple], + construct_type( + type_=typing.List[UserSimple], # type: ignore + object_=_response.json(), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def duplicate( self, id: int, diff --git a/src/label_studio_sdk/projects/types/lse_project_create_request_sampling.py b/src/label_studio_sdk/projects/types/lse_project_create_request_sampling.py index 04e070a9b..5134a0dbc 100644 --- a/src/label_studio_sdk/projects/types/lse_project_create_request_sampling.py +++ b/src/label_studio_sdk/projects/types/lse_project_create_request_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from ...types.sampling_enum import SamplingEnum +from ...types.sampling_de5enum import SamplingDe5Enum from ...types.null_enum import NullEnum -LseProjectCreateRequestSampling = typing.Union[SamplingEnum, NullEnum] +LseProjectCreateRequestSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py b/src/label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py index ce868747d..1788f3c1f 100644 --- a/src/label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py +++ b/src/label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from ...types.sampling_enum import SamplingEnum +from ...types.sampling_de5enum import SamplingDe5Enum from ...types.null_enum import NullEnum -PatchedLseProjectUpdateRequestSampling = typing.Union[SamplingEnum, NullEnum] +PatchedLseProjectUpdateRequestSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/__init__.py b/src/label_studio_sdk/types/__init__.py index f3078c9d4..4ac4627ae 100644 --- a/src/label_studio_sdk/types/__init__.py +++ b/src/label_studio_sdk/types/__init__.py @@ -188,8 +188,11 @@ from .review_settings_request import ReviewSettingsRequest from .review_settings_request_requeue_rejected_tasks_mode import ReviewSettingsRequestRequeueRejectedTasksMode from .review_settings_request_review_criteria import ReviewSettingsRequestReviewCriteria +from .review_settings_request_sampling import ReviewSettingsRequestSampling from .review_settings_requeue_rejected_tasks_mode import ReviewSettingsRequeueRejectedTasksMode from .review_settings_review_criteria import ReviewSettingsReviewCriteria +from .review_settings_sampling import ReviewSettingsSampling +from .review_settings_sampling_enum import ReviewSettingsSamplingEnum from .reviewed_enum import ReviewedEnum from .role9e7enum import Role9E7Enum from .role_based_task import RoleBasedTask @@ -197,7 +200,7 @@ from .s3import_storage import S3ImportStorage from .saml_settings import SamlSettings from .saml_settings_update import SamlSettingsUpdate -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .scim_settings import ScimSettings from .scim_settings_update import ScimSettingsUpdate from .scope_enum import ScopeEnum @@ -422,8 +425,11 @@ "ReviewSettingsRequest", "ReviewSettingsRequestRequeueRejectedTasksMode", "ReviewSettingsRequestReviewCriteria", + "ReviewSettingsRequestSampling", "ReviewSettingsRequeueRejectedTasksMode", "ReviewSettingsReviewCriteria", + "ReviewSettingsSampling", + "ReviewSettingsSamplingEnum", "ReviewedEnum", "Role9E7Enum", "RoleBasedTask", @@ -431,7 +437,7 @@ "S3ImportStorage", "SamlSettings", "SamlSettingsUpdate", - "SamplingEnum", + "SamplingDe5Enum", "ScimSettings", "ScimSettingsUpdate", "ScopeEnum", diff --git a/src/label_studio_sdk/types/all_roles_project_list_sampling.py b/src/label_studio_sdk/types/all_roles_project_list_sampling.py index c92dcee55..6d7c3a27a 100644 --- a/src/label_studio_sdk/types/all_roles_project_list_sampling.py +++ b/src/label_studio_sdk/types/all_roles_project_list_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .null_enum import NullEnum -AllRolesProjectListSampling = typing.Union[SamplingEnum, NullEnum] +AllRolesProjectListSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/azure_blob_import_storage.py b/src/label_studio_sdk/types/azure_blob_import_storage.py index 65cf56cb4..0a5fe833e 100644 --- a/src/label_studio_sdk/types/azure_blob_import_storage.py +++ b/src/label_studio_sdk/types/azure_blob_import_storage.py @@ -67,6 +67,11 @@ class AzureBlobImportStorage(UncheckedBaseModel): A unique integer value identifying this project. """ + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + """ + Perform recursive scan over the container content + """ + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/gcs_import_storage.py b/src/label_studio_sdk/types/gcs_import_storage.py index 9b5700f3e..d1bf42bb7 100644 --- a/src/label_studio_sdk/types/gcs_import_storage.py +++ b/src/label_studio_sdk/types/gcs_import_storage.py @@ -67,6 +67,11 @@ class GcsImportStorage(UncheckedBaseModel): A unique integer value identifying this project. """ + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + """ + Perform recursive scan over the bucket content + """ + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/gcswif_import_storage.py b/src/label_studio_sdk/types/gcswif_import_storage.py index 99d3204e1..b2c784a76 100644 --- a/src/label_studio_sdk/types/gcswif_import_storage.py +++ b/src/label_studio_sdk/types/gcswif_import_storage.py @@ -87,6 +87,11 @@ class GcswifImportStorage(UncheckedBaseModel): A unique integer value identifying this project. """ + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + """ + Perform recursive scan over the bucket content + """ + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/gcswif_import_storage_request.py b/src/label_studio_sdk/types/gcswif_import_storage_request.py index 1517240f3..eb1d1c04a 100644 --- a/src/label_studio_sdk/types/gcswif_import_storage_request.py +++ b/src/label_studio_sdk/types/gcswif_import_storage_request.py @@ -81,6 +81,11 @@ class GcswifImportStorageRequest(UncheckedBaseModel): A unique integer value identifying this project. """ + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + """ + Perform recursive scan over the bucket content + """ + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/local_files_import_storage.py b/src/label_studio_sdk/types/local_files_import_storage.py index 4e3cd4f9e..f9f89fb20 100644 --- a/src/label_studio_sdk/types/local_files_import_storage.py +++ b/src/label_studio_sdk/types/local_files_import_storage.py @@ -46,6 +46,11 @@ class LocalFilesImportStorage(UncheckedBaseModel): A unique integer value identifying this project. """ + recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) + """ + Perform recursive scan over the directory content + """ + regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Regex for filtering objects diff --git a/src/label_studio_sdk/types/lse_project_create_sampling.py b/src/label_studio_sdk/types/lse_project_create_sampling.py index 41ade7ac7..9979401ba 100644 --- a/src/label_studio_sdk/types/lse_project_create_sampling.py +++ b/src/label_studio_sdk/types/lse_project_create_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .null_enum import NullEnum -LseProjectCreateSampling = typing.Union[SamplingEnum, NullEnum] +LseProjectCreateSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/lse_project_sampling.py b/src/label_studio_sdk/types/lse_project_sampling.py index fa58a1f30..383addf49 100644 --- a/src/label_studio_sdk/types/lse_project_sampling.py +++ b/src/label_studio_sdk/types/lse_project_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .null_enum import NullEnum -LseProjectSampling = typing.Union[SamplingEnum, NullEnum] +LseProjectSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/lse_project_update_sampling.py b/src/label_studio_sdk/types/lse_project_update_sampling.py index 0763b90e4..206e123f2 100644 --- a/src/label_studio_sdk/types/lse_project_update_sampling.py +++ b/src/label_studio_sdk/types/lse_project_update_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .null_enum import NullEnum -LseProjectUpdateSampling = typing.Union[SamplingEnum, NullEnum] +LseProjectUpdateSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/project_sampling.py b/src/label_studio_sdk/types/project_sampling.py index ee1079d71..a3aab25e4 100644 --- a/src/label_studio_sdk/types/project_sampling.py +++ b/src/label_studio_sdk/types/project_sampling.py @@ -1,7 +1,7 @@ # This file was auto-generated by Fern from our API Definition. import typing -from .sampling_enum import SamplingEnum +from .sampling_de5enum import SamplingDe5Enum from .null_enum import NullEnum -ProjectSampling = typing.Union[SamplingEnum, NullEnum] +ProjectSampling = typing.Union[SamplingDe5Enum, NullEnum] diff --git a/src/label_studio_sdk/types/review_settings.py b/src/label_studio_sdk/types/review_settings.py index 9ccfd0605..afb39d3ee 100644 --- a/src/label_studio_sdk/types/review_settings.py +++ b/src/label_studio_sdk/types/review_settings.py @@ -5,6 +5,7 @@ import pydantic from .review_settings_requeue_rejected_tasks_mode import ReviewSettingsRequeueRejectedTasksMode from .review_settings_review_criteria import ReviewSettingsReviewCriteria +from .review_settings_sampling import ReviewSettingsSampling from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -54,6 +55,19 @@ class ReviewSettings(UncheckedBaseModel): When set True, review queue is built only from manually assigned tasks """ + review_task_limit_percent: typing.Optional[str] = pydantic.Field(default=None) + """ + Percent of tasks to include in review stream (0-100). Null/0 disables. + """ + + sampling: typing.Optional[ReviewSettingsSampling] = pydantic.Field(default=None) + """ + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + """ + show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ Show the agreement column to reviewers diff --git a/src/label_studio_sdk/types/review_settings_request.py b/src/label_studio_sdk/types/review_settings_request.py index e42a24869..7faf2f0f0 100644 --- a/src/label_studio_sdk/types/review_settings_request.py +++ b/src/label_studio_sdk/types/review_settings_request.py @@ -5,6 +5,7 @@ import pydantic from .review_settings_request_requeue_rejected_tasks_mode import ReviewSettingsRequestRequeueRejectedTasksMode from .review_settings_request_review_criteria import ReviewSettingsRequestReviewCriteria +from .review_settings_request_sampling import ReviewSettingsRequestSampling from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -54,6 +55,19 @@ class ReviewSettingsRequest(UncheckedBaseModel): When set True, review queue is built only from manually assigned tasks """ + review_task_limit_percent: typing.Optional[str] = pydantic.Field(default=None) + """ + Percent of tasks to include in review stream (0-100). Null/0 disables. + """ + + sampling: typing.Optional[ReviewSettingsRequestSampling] = pydantic.Field(default=None) + """ + Task sampling strategy in the review stream (by task id or random) + + * `task_id` - By Task ID + * `random` - Random + """ + show_agreement_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) """ Show the agreement column to reviewers diff --git a/src/label_studio_sdk/types/review_settings_request_sampling.py b/src/label_studio_sdk/types/review_settings_request_sampling.py new file mode 100644 index 000000000..5187b391f --- /dev/null +++ b/src/label_studio_sdk/types/review_settings_request_sampling.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from .review_settings_sampling_enum import ReviewSettingsSamplingEnum +from .blank_enum import BlankEnum +from .null_enum import NullEnum + +ReviewSettingsRequestSampling = typing.Union[ReviewSettingsSamplingEnum, BlankEnum, NullEnum] diff --git a/src/label_studio_sdk/types/review_settings_sampling.py b/src/label_studio_sdk/types/review_settings_sampling.py new file mode 100644 index 000000000..d9cdeb1af --- /dev/null +++ b/src/label_studio_sdk/types/review_settings_sampling.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from .review_settings_sampling_enum import ReviewSettingsSamplingEnum +from .blank_enum import BlankEnum +from .null_enum import NullEnum + +ReviewSettingsSampling = typing.Union[ReviewSettingsSamplingEnum, BlankEnum, NullEnum] diff --git a/src/label_studio_sdk/types/review_settings_sampling_enum.py b/src/label_studio_sdk/types/review_settings_sampling_enum.py new file mode 100644 index 000000000..95f6eb83f --- /dev/null +++ b/src/label_studio_sdk/types/review_settings_sampling_enum.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ReviewSettingsSamplingEnum = typing.Union[typing.Literal["task_id", "random"], typing.Any] diff --git a/src/label_studio_sdk/types/sampling_enum.py b/src/label_studio_sdk/types/sampling_de5enum.py similarity index 84% rename from src/label_studio_sdk/types/sampling_enum.py rename to src/label_studio_sdk/types/sampling_de5enum.py index b94881c72..37b7ea282 100644 --- a/src/label_studio_sdk/types/sampling_enum.py +++ b/src/label_studio_sdk/types/sampling_de5enum.py @@ -2,6 +2,6 @@ import typing -SamplingEnum = typing.Union[ +SamplingDe5Enum = typing.Union[ typing.Literal["Sequential sampling", "Uniform sampling", "Uncertainty sampling"], typing.Any ] diff --git a/tests/import_storage/test_azure.py b/tests/import_storage/test_azure.py index c531ff055..76a6b1901 100644 --- a/tests/import_storage/test_azure.py +++ b/tests/import_storage/test_azure.py @@ -23,6 +23,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -50,6 +51,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -83,6 +85,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -106,6 +109,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -150,6 +154,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -173,6 +178,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -217,6 +223,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -240,6 +247,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -271,6 +279,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -294,6 +303,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, diff --git a/tests/import_storage/test_gcs.py b/tests/import_storage/test_gcs.py index 0ddbda076..a54df8978 100644 --- a/tests/import_storage/test_gcs.py +++ b/tests/import_storage/test_gcs.py @@ -23,6 +23,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -50,6 +51,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -83,6 +85,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -106,6 +109,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -150,6 +154,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -173,6 +178,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -217,6 +223,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -240,6 +247,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -271,6 +279,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -294,6 +303,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, diff --git a/tests/import_storage/test_gcswif.py b/tests/import_storage/test_gcswif.py index 530f7b291..cedc92fbd 100644 --- a/tests/import_storage/test_gcswif.py +++ b/tests/import_storage/test_gcswif.py @@ -27,6 +27,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -58,6 +59,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -95,6 +97,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -122,6 +125,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -170,6 +174,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -197,6 +202,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -245,6 +251,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -272,6 +279,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -307,6 +315,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": True, "presign_ttl": 1, "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -334,6 +343,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": None, "presign_ttl": "integer", "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, diff --git a/tests/import_storage/test_local.py b/tests/import_storage/test_local.py index 0829644b7..03dd8014d 100644 --- a/tests/import_storage/test_local.py +++ b/tests/import_storage/test_local.py @@ -18,6 +18,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "meta": {"key": "value"}, "path": "path", "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -40,6 +41,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "meta": None, "path": None, "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -68,6 +70,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "meta": {"key": "value"}, "path": "path", "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -86,6 +89,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "meta": None, "path": None, "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -125,6 +129,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "meta": {"key": "value"}, "path": "path", "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -143,6 +148,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "meta": None, "path": None, "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -182,6 +188,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "meta": {"key": "value"}, "path": "path", "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -200,6 +207,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "meta": None, "path": None, "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -226,6 +234,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "meta": {"key": "value"}, "path": "path", "project": 1, + "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -244,6 +253,7 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "meta": None, "path": None, "project": "integer", + "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, diff --git a/tests/test_project_templates.py b/tests/test_project_templates.py index 2c8855bfc..5a8b1a091 100644 --- a/tests/test_project_templates.py +++ b/tests/test_project_templates.py @@ -249,6 +249,8 @@ async def test_create_project_from_template(client: LabelStudio, async_client: A "require_comment_on_reject": True, "review_criteria": "all", "review_only_manual_assignments": True, + "review_task_limit_percent": "review_task_limit_percent", + "sampling": "task_id", "show_agreement_to_reviewers": True, "show_data_manager_to_reviewers": True, "show_instruction": True, @@ -332,6 +334,8 @@ async def test_create_project_from_template(client: LabelStudio, async_client: A "require_comment_on_reject": None, "review_criteria": None, "review_only_manual_assignments": None, + "review_task_limit_percent": None, + "sampling": None, "show_agreement_to_reviewers": None, "show_data_manager_to_reviewers": None, "show_instruction": None, diff --git a/tests/test_projects.py b/tests/test_projects.py index 376a5a31d..14cac8ce3 100644 --- a/tests/test_projects.py +++ b/tests/test_projects.py @@ -350,6 +350,8 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "require_comment_on_reject": True, "review_criteria": "all", "review_only_manual_assignments": True, + "review_task_limit_percent": "review_task_limit_percent", + "sampling": "task_id", "show_agreement_to_reviewers": True, "show_data_manager_to_reviewers": True, "show_instruction": True, @@ -426,6 +428,8 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "require_comment_on_reject": None, "review_criteria": None, "review_only_manual_assignments": None, + "review_task_limit_percent": None, + "sampling": None, "show_agreement_to_reviewers": None, "show_data_manager_to_reviewers": None, "show_instruction": None, @@ -459,6 +463,21 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No validate_response(async_response, expected_response, expected_types) +async def test_list_unique_annotators(client: LabelStudio, async_client: AsyncLabelStudio) -> None: + expected_response: typing.Any = [ + {"avatar": "avatar", "email": "email", "first_name": "first_name", "id": 1, "last_name": "last_name"} + ] + expected_types: typing.Tuple[typing.Any, typing.Any] = ( + "list", + {0: {"avatar": None, "email": None, "first_name": None, "id": "integer", "last_name": None}}, + ) + response = client.projects.list_unique_annotators(id=1) + validate_response(response, expected_response, expected_types) + + async_response = await async_client.projects.list_unique_annotators(id=1) + validate_response(async_response, expected_response, expected_types) + + async def test_duplicate(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = {"id": 1} expected_types: typing.Any = {"id": "integer"}