diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 3bff07c40..27a8eb051 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -187,63 +187,43 @@ types: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - show_ground_truth_first: optional - rejected: string - label_config: - type: optional - docs: Label config in XML format. See more about it in documentation - show_instruction: + show_overlap_first: optional + pinned_at: + type: optional + docs: Pinned date and time + allow_stream: string + is_draft: type: optional - docs: Show instructions to the annotator before they start - duplication_status: optional + docs: Whether or not the project is in the middle of being created + show_collab_predictions: + type: optional + docs: If set, the annotator can view model predictions + overlap_cohort_percentage: + type: optional + validation: + min: -2147483648 + max: 2147483647 + created_at: datetime control_weights: optional - workspace: string - finished_task_number: integer - show_skip_button: + duplication_done: type: optional - docs: Show a skip button in interface and allow annotators to skip the task - created_by: - type: optional - docs: Project owner - assignment_settings: AssignmentSettings - reviewed_number: string - model_version: - type: optional - docs: Machine learning model version - data_types: unknown - description_short: string - queue_left: string - annotation_limit_percent: + default: false + title: type: optional + docs: Project name. Must be between 3 and 50 characters long. validation: - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - config_has_control_tags: - type: boolean - docs: Flag to detect is project ready for labeling - total_predictions_number: integer - useful_annotation_number: string - custom_script: optional - reviewer_queue_total: string - start_training_on_annotation_update: - type: boolean - docs: Start model training after any annotations are submitted or updated - skipped_annotations_number: string - custom_task_lock_ttl: - type: optional - docs: TTL in seconds for task reservations, on new and existing tasks - validation: - min: 1 - max: 86400 - workspace_title: string - sampling: optional - reveal_preannotations_interactively: + minLength: 3 + maxLength: 50 + workspace: string + review_settings: ReviewSettings + num_tasks_with_annotations: string + show_annotation_history: type: optional - docs: Reveal pre-annotations interactively - id: integer + docs: Show annotation history to annotator + queue_total: string + prompts: string has_blueprints: string - queue_done: string - total_annotations_number: string - members_count: string + show_ground_truth_first: optional maximum_annotations: type: optional docs: >- @@ -253,79 +233,94 @@ types: validation: min: -2147483648 max: 2147483647 - comment_classification_config: optional - prompts: string - created_at: datetime - ready: string - annotator_evaluation_minimum_tasks: + queue_done: string + sampling: optional + parsed_label_config: unknown + blueprints: list + custom_task_lock_ttl: type: optional - default: 10 + docs: TTL in seconds for task reservations, on new and existing tasks validation: - min: 0 - config_suitable_for_bulk_annotation: - type: boolean - docs: Flag to detect is project ready for bulk annotation - skip_queue: optional - title: + min: 1 + max: 86400 + description: type: optional - docs: Project name. Must be between 3 and 50 characters long. - validation: - minLength: 3 - maxLength: 50 - show_overlap_first: optional - queue_total: string - organization: optional - duplication_done: + docs: Project description + members_count: string + show_instruction: type: optional - default: false - ground_truth_number: - type: integer - docs: Honeypot annotation number in project + docs: Show instructions to the annotator before they start + evaluate_predictions_automatically: + type: optional + docs: Retrieve and display predictions when loading a task + label_config: + type: optional + docs: Label config in XML format. See more about it in documentation + finished_task_number: integer + useful_annotation_number: string + queue_left: string annotation_limit_count: type: optional validation: min: 1 - evaluate_predictions_automatically: - type: optional - docs: Retrieve and display predictions when loading a task - blueprints: list + reviewer_queue_total: string + custom_script: optional color: type: optional validation: maxLength: 16 - review_settings: ReviewSettings - pinned_at: - type: optional - docs: Pinned date and time - members: string + expert_instruction: + type: optional + docs: Labeling instructions in HTML format require_comment_on_skip: type: optional default: false - show_annotation_history: - type: optional - docs: Show annotation history to annotator + duplication_status: optional + organization: optional + created_by: + type: optional + docs: Project owner + id: integer task_number: type: integer docs: Total task number in project - is_published: + model_version: + type: optional + docs: Machine learning model version + enable_empty_annotation: type: optional - docs: Whether or not the project is published to annotators - show_collab_predictions: + docs: Allow annotators to submit empty annotations + start_training_on_annotation_update: + type: boolean + docs: Start model training after any annotations are submitted or updated + data_types: unknown + config_has_control_tags: + type: boolean + docs: Flag to detect is project ready for labeling + skipped_annotations_number: string + total_predictions_number: integer + ready: string + rejected: string + skip_queue: optional + reveal_preannotations_interactively: type: optional - docs: If set, the annotator can view model predictions - review_total_tasks: string - num_tasks_with_annotations: string - expert_instruction: + docs: Reveal pre-annotations interactively + pause_on_failed_annotator_evaluation: + type: optional + default: false + workspace_title: string + reviewed_number: string + annotation_limit_percent: type: optional - docs: Labeling instructions in HTML format - overlap_cohort_percentage: - type: optional validation: - min: -2147483648 - max: 2147483647 - is_draft: + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ + review_total_tasks: string + is_published: type: optional - docs: Whether or not the project is in the middle of being created + docs: Whether or not the project is published to annotators + show_skip_button: + type: optional + docs: Show a skip button in interface and allow annotators to skip the task min_annotations_to_start_training: type: optional docs: >- @@ -334,22 +329,27 @@ types: validation: min: -2147483648 max: 2147483647 - enable_empty_annotation: - type: optional - docs: Allow annotators to submit empty annotations + total_annotations_number: string + config_suitable_for_bulk_annotation: + type: boolean + docs: Flag to detect is project ready for bulk annotation + assignment_settings: AssignmentSettings + members: string + ground_truth_number: + type: integer + docs: Honeypot annotation number in project + comment_classification_config: optional + annotator_evaluation_minimum_tasks: + type: optional + default: 10 + validation: + min: 0 + description_short: string annotator_evaluation_minimum_score: type: optional default: '95.00' validation: pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - description: - type: optional - docs: Project description - pause_on_failed_annotator_evaluation: - type: optional - default: false - allow_stream: string - parsed_label_config: unknown source: openapi: openapi/openapi.yaml AnnotatedEnum: diff --git a/.mock/definition/projects.yml b/.mock/definition/projects.yml index 9597946f4..2b1658848 100644 --- a/.mock/definition/projects.yml +++ b/.mock/definition/projects.yml @@ -160,89 +160,89 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - show_ground_truth_first: true - rejected: rejected - label_config: label_config - show_instruction: true - duplication_status: duplication_status + - show_overlap_first: true + pinned_at: '2024-01-15T09:30:00Z' + allow_stream: allow_stream + is_draft: true + show_collab_predictions: true + overlap_cohort_percentage: 1 + created_at: '2024-01-15T09:30:00Z' control_weights: key: value + duplication_done: true + title: title workspace: workspace + review_settings: + id: 1 + requeue_rejected_tasks_to_annotator: true + num_tasks_with_annotations: num_tasks_with_annotations + show_annotation_history: true + queue_total: queue_total + prompts: prompts + has_blueprints: has_blueprints + show_ground_truth_first: true + maximum_annotations: 1 + queue_done: queue_done + sampling: Sequential sampling + parsed_label_config: + key: value + blueprints: + - id: 1 + share_id: share_id + short_url: short_url + created_at: '2024-01-15T09:30:00Z' + custom_task_lock_ttl: 1 + description: description + members_count: members_count + show_instruction: true + evaluate_predictions_automatically: true + label_config: label_config finished_task_number: 1 - show_skip_button: true + useful_annotation_number: useful_annotation_number + queue_left: queue_left + annotation_limit_count: 1 + reviewer_queue_total: reviewer_queue_total + custom_script: custom_script + color: color + expert_instruction: expert_instruction + require_comment_on_skip: true + duplication_status: duplication_status + organization: 1 created_by: id: 1 avatar: avatar - assignment_settings: - id: 1 - reviewed_number: reviewed_number + id: 1 + task_number: 1 model_version: model_version + enable_empty_annotation: true + start_training_on_annotation_update: true data_types: key: value - description_short: description_short - queue_left: queue_left - annotation_limit_percent: annotation_limit_percent config_has_control_tags: true - total_predictions_number: 1 - useful_annotation_number: useful_annotation_number - custom_script: custom_script - reviewer_queue_total: reviewer_queue_total - start_training_on_annotation_update: true skipped_annotations_number: skipped_annotations_number - custom_task_lock_ttl: 1 - workspace_title: workspace_title - sampling: Sequential sampling + total_predictions_number: 1 + ready: ready + rejected: rejected + skip_queue: REQUEUE_FOR_ME reveal_preannotations_interactively: true - id: 1 - has_blueprints: has_blueprints - queue_done: queue_done + pause_on_failed_annotator_evaluation: true + workspace_title: workspace_title + reviewed_number: reviewed_number + annotation_limit_percent: annotation_limit_percent + review_total_tasks: review_total_tasks + is_published: true + show_skip_button: true + min_annotations_to_start_training: 1 total_annotations_number: total_annotations_number - members_count: members_count - maximum_annotations: 1 - comment_classification_config: comment_classification_config - prompts: prompts - created_at: '2024-01-15T09:30:00Z' - ready: ready - annotator_evaluation_minimum_tasks: 1 config_suitable_for_bulk_annotation: true - skip_queue: REQUEUE_FOR_ME - title: title - show_overlap_first: true - queue_total: queue_total - organization: 1 - duplication_done: true - ground_truth_number: 1 - annotation_limit_count: 1 - evaluate_predictions_automatically: true - blueprints: - - id: 1 - share_id: share_id - short_url: short_url - created_at: '2024-01-15T09:30:00Z' - color: color - review_settings: + assignment_settings: id: 1 - requeue_rejected_tasks_to_annotator: true - pinned_at: '2024-01-15T09:30:00Z' members: members - require_comment_on_skip: true - show_annotation_history: true - task_number: 1 - is_published: true - show_collab_predictions: true - review_total_tasks: review_total_tasks - num_tasks_with_annotations: num_tasks_with_annotations - expert_instruction: expert_instruction - overlap_cohort_percentage: 1 - is_draft: true - min_annotations_to_start_training: 1 - enable_empty_annotation: true + ground_truth_number: 1 + comment_classification_config: comment_classification_config + annotator_evaluation_minimum_tasks: 1 + description_short: description_short annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - description: description - pause_on_failed_annotator_evaluation: true - allow_stream: allow_stream - parsed_label_config: - key: value audiences: - public create: diff --git a/.mock/definition/prompts.yml b/.mock/definition/prompts.yml index 537d82924..854c0bf54 100644 --- a/.mock/definition/prompts.yml +++ b/.mock/definition/prompts.yml @@ -424,89 +424,89 @@ service: next: http://api.example.org/accounts/?page=4 previous: http://api.example.org/accounts/?page=2 results: - - show_ground_truth_first: true - rejected: rejected - label_config: label_config - show_instruction: true - duplication_status: duplication_status + - show_overlap_first: true + pinned_at: '2024-01-15T09:30:00Z' + allow_stream: allow_stream + is_draft: true + show_collab_predictions: true + overlap_cohort_percentage: 1 + created_at: '2024-01-15T09:30:00Z' control_weights: key: value + duplication_done: true + title: title workspace: workspace + review_settings: + id: 1 + requeue_rejected_tasks_to_annotator: true + num_tasks_with_annotations: num_tasks_with_annotations + show_annotation_history: true + queue_total: queue_total + prompts: prompts + has_blueprints: has_blueprints + show_ground_truth_first: true + maximum_annotations: 1 + queue_done: queue_done + sampling: Sequential sampling + parsed_label_config: + key: value + blueprints: + - id: 1 + share_id: share_id + short_url: short_url + created_at: '2024-01-15T09:30:00Z' + custom_task_lock_ttl: 1 + description: description + members_count: members_count + show_instruction: true + evaluate_predictions_automatically: true + label_config: label_config finished_task_number: 1 - show_skip_button: true + useful_annotation_number: useful_annotation_number + queue_left: queue_left + annotation_limit_count: 1 + reviewer_queue_total: reviewer_queue_total + custom_script: custom_script + color: color + expert_instruction: expert_instruction + require_comment_on_skip: true + duplication_status: duplication_status + organization: 1 created_by: id: 1 avatar: avatar - assignment_settings: - id: 1 - reviewed_number: reviewed_number + id: 1 + task_number: 1 model_version: model_version + enable_empty_annotation: true + start_training_on_annotation_update: true data_types: key: value - description_short: description_short - queue_left: queue_left - annotation_limit_percent: annotation_limit_percent config_has_control_tags: true - total_predictions_number: 1 - useful_annotation_number: useful_annotation_number - custom_script: custom_script - reviewer_queue_total: reviewer_queue_total - start_training_on_annotation_update: true skipped_annotations_number: skipped_annotations_number - custom_task_lock_ttl: 1 - workspace_title: workspace_title - sampling: Sequential sampling + total_predictions_number: 1 + ready: ready + rejected: rejected + skip_queue: REQUEUE_FOR_ME reveal_preannotations_interactively: true - id: 1 - has_blueprints: has_blueprints - queue_done: queue_done + pause_on_failed_annotator_evaluation: true + workspace_title: workspace_title + reviewed_number: reviewed_number + annotation_limit_percent: annotation_limit_percent + review_total_tasks: review_total_tasks + is_published: true + show_skip_button: true + min_annotations_to_start_training: 1 total_annotations_number: total_annotations_number - members_count: members_count - maximum_annotations: 1 - comment_classification_config: comment_classification_config - prompts: prompts - created_at: '2024-01-15T09:30:00Z' - ready: ready - annotator_evaluation_minimum_tasks: 1 config_suitable_for_bulk_annotation: true - skip_queue: REQUEUE_FOR_ME - title: title - show_overlap_first: true - queue_total: queue_total - organization: 1 - duplication_done: true - ground_truth_number: 1 - annotation_limit_count: 1 - evaluate_predictions_automatically: true - blueprints: - - id: 1 - share_id: share_id - short_url: short_url - created_at: '2024-01-15T09:30:00Z' - color: color - review_settings: + assignment_settings: id: 1 - requeue_rejected_tasks_to_annotator: true - pinned_at: '2024-01-15T09:30:00Z' members: members - require_comment_on_skip: true - show_annotation_history: true - task_number: 1 - is_published: true - show_collab_predictions: true - review_total_tasks: review_total_tasks - num_tasks_with_annotations: num_tasks_with_annotations - expert_instruction: expert_instruction - overlap_cohort_percentage: 1 - is_draft: true - min_annotations_to_start_training: 1 - enable_empty_annotation: true + ground_truth_number: 1 + comment_classification_config: comment_classification_config + annotator_evaluation_minimum_tasks: 1 + description_short: description_short annotator_evaluation_minimum_score: annotator_evaluation_minimum_score - description: description - pause_on_failed_annotator_evaluation: true - allow_stream: allow_stream - parsed_label_config: - key: value audiences: - public source: diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 2464e83e4..8f12c349a 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -15771,20 +15771,31 @@ components: Serializer get numbers from project queryset annotation, make sure, that you use correct one(Project.objects.with_counts()) properties: - show_ground_truth_first: + show_overlap_first: type: boolean - rejected: - type: string - readOnly: true - label_config: + pinned_at: type: string + format: date-time nullable: true - description: Label config in XML format. See more about it in documentation - show_instruction: + description: Pinned date and time + allow_stream: + type: string + readOnly: true + is_draft: type: boolean - description: Show instructions to the annotator before they start - duplication_status: + description: Whether or not the project is in the middle of being created + show_collab_predictions: + type: boolean + title: Show predictions to annotator + description: If set, the annotator can view model predictions + overlap_cohort_percentage: + type: integer + maximum: 2147483647 + minimum: -2147483648 + created_at: type: string + format: date-time + readOnly: true control_weights: nullable: true description: 'Dict of weights for each control tag in metric calculation. @@ -15795,65 +15806,60 @@ components: be twice more important than Airplaine, then you have to need the specify: {''my_bbox'': {''type'': ''RectangleLabels'', ''labels'': {''Car'': 1.0, ''Airplaine'': 0.5}, ''overall'': 0.33}' + duplication_done: + type: boolean + default: false + title: + type: string + nullable: true + description: Project name. Must be between 3 and 50 characters long. + maxLength: 50 + minLength: 3 workspace: type: string readOnly: true - finished_task_number: - type: integer - readOnly: true - show_skip_button: - type: boolean - description: Show a skip button in interface and allow annotators to skip - the task - created_by: - allOf: - - $ref: '#/components/schemas/UserSimple' - description: Project owner - assignment_settings: - $ref: '#/components/schemas/AssignmentSettings' - reviewed_number: + review_settings: + $ref: '#/components/schemas/ReviewSettings' + num_tasks_with_annotations: type: string readOnly: true - model_version: + show_annotation_history: + type: boolean + description: Show annotation history to annotator + queue_total: type: string - nullable: true - description: Machine learning model version - data_types: readOnly: true - nullable: true - description_short: + prompts: type: string readOnly: true - queue_left: + has_blueprints: type: string readOnly: true - annotation_limit_percent: - type: string - format: decimal - pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ - nullable: true - config_has_control_tags: + show_ground_truth_first: type: boolean - readOnly: true - description: Flag to detect is project ready for labeling - total_predictions_number: + maximum_annotations: type: integer - readOnly: true - useful_annotation_number: - type: string - readOnly: true - custom_script: - type: string - reviewer_queue_total: + maximum: 2147483647 + minimum: -2147483648 + title: Maximum annotation number + description: Maximum number of annotations for one task. If the number of + annotations per task is equal or greater to this value, the task is completed + (is_labeled=True) + queue_done: type: string readOnly: true - start_training_on_annotation_update: - type: boolean + sampling: + nullable: true + oneOf: + - $ref: '#/components/schemas/SamplingEnum' + - $ref: '#/components/schemas/NullEnum' + parsed_label_config: readOnly: true - description: Start model training after any annotations are submitted or - updated - skipped_annotations_number: - type: string + description: JSON-formatted labeling configuration + blueprints: + type: array + items: + $ref: '#/components/schemas/BlueprintList' readOnly: true custom_task_lock_ttl: type: integer @@ -15861,177 +15867,171 @@ components: minimum: 1 nullable: true description: TTL in seconds for task reservations, on new and existing tasks - workspace_title: + description: type: string - readOnly: true - sampling: nullable: true - oneOf: - - $ref: '#/components/schemas/SamplingEnum' - - $ref: '#/components/schemas/NullEnum' - reveal_preannotations_interactively: - type: boolean - description: Reveal pre-annotations interactively - id: - type: integer - readOnly: true - has_blueprints: + description: Project description + members_count: type: string readOnly: true - queue_done: + show_instruction: + type: boolean + description: Show instructions to the annotator before they start + evaluate_predictions_automatically: + type: boolean + description: Retrieve and display predictions when loading a task + label_config: type: string + nullable: true + description: Label config in XML format. See more about it in documentation + finished_task_number: + type: integer readOnly: true - total_annotations_number: + useful_annotation_number: type: string readOnly: true - members_count: + queue_left: type: string readOnly: true - maximum_annotations: + annotation_limit_count: type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Maximum annotation number - description: Maximum number of annotations for one task. If the number of - annotations per task is equal or greater to this value, the task is completed - (is_labeled=True) - comment_classification_config: - type: string - prompts: + minimum: 1 + nullable: true + reviewer_queue_total: type: string readOnly: true - created_at: + custom_script: type: string - format: date-time - readOnly: true - ready: + color: type: string - readOnly: true - annotator_evaluation_minimum_tasks: - type: integer - minimum: 0 - nullable: true - default: 10 - config_suitable_for_bulk_annotation: - type: boolean - readOnly: true - description: Flag to detect is project ready for bulk annotation - skip_queue: nullable: true - oneOf: - - $ref: '#/components/schemas/SkipQueueEnum' - - $ref: '#/components/schemas/NullEnum' - title: + maxLength: 16 + expert_instruction: type: string nullable: true - description: Project name. Must be between 3 and 50 characters long. - maxLength: 50 - minLength: 3 - show_overlap_first: + description: Labeling instructions in HTML format + require_comment_on_skip: type: boolean - queue_total: + default: false + duplication_status: type: string - readOnly: true organization: type: integer nullable: true - duplication_done: - type: boolean - default: false - ground_truth_number: + created_by: + allOf: + - $ref: '#/components/schemas/UserSimple' + description: Project owner + id: type: integer readOnly: true - description: Honeypot annotation number in project - annotation_limit_count: + task_number: type: integer - minimum: 1 - nullable: true - evaluate_predictions_automatically: - type: boolean - description: Retrieve and display predictions when loading a task - blueprints: - type: array - items: - $ref: '#/components/schemas/BlueprintList' readOnly: true - color: + description: Total task number in project + model_version: type: string nullable: true - maxLength: 16 - review_settings: - $ref: '#/components/schemas/ReviewSettings' - pinned_at: - type: string - format: date-time + description: Machine learning model version + enable_empty_annotation: + type: boolean + description: Allow annotators to submit empty annotations + start_training_on_annotation_update: + type: boolean + readOnly: true + description: Start model training after any annotations are submitted or + updated + data_types: + readOnly: true nullable: true - description: Pinned date and time - members: + config_has_control_tags: + type: boolean + readOnly: true + description: Flag to detect is project ready for labeling + skipped_annotations_number: type: string readOnly: true - require_comment_on_skip: - type: boolean - default: false - show_annotation_history: - type: boolean - description: Show annotation history to annotator - task_number: + total_predictions_number: type: integer readOnly: true - description: Total task number in project - is_published: + ready: + type: string + readOnly: true + rejected: + type: string + readOnly: true + skip_queue: + nullable: true + oneOf: + - $ref: '#/components/schemas/SkipQueueEnum' + - $ref: '#/components/schemas/NullEnum' + reveal_preannotations_interactively: type: boolean - title: Published - description: Whether or not the project is published to annotators - show_collab_predictions: + description: Reveal pre-annotations interactively + pause_on_failed_annotator_evaluation: type: boolean - title: Show predictions to annotator - description: If set, the annotator can view model predictions - review_total_tasks: + nullable: true + default: false + workspace_title: type: string readOnly: true - num_tasks_with_annotations: + reviewed_number: type: string readOnly: true - expert_instruction: + annotation_limit_percent: type: string + format: decimal + pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ nullable: true - description: Labeling instructions in HTML format - overlap_cohort_percentage: - type: integer - maximum: 2147483647 - minimum: -2147483648 - is_draft: + review_total_tasks: + type: string + readOnly: true + is_published: type: boolean - description: Whether or not the project is in the middle of being created + title: Published + description: Whether or not the project is published to annotators + show_skip_button: + type: boolean + description: Show a skip button in interface and allow annotators to skip + the task min_annotations_to_start_training: type: integer maximum: 2147483647 minimum: -2147483648 description: Minimum number of completed tasks after which model training is started - enable_empty_annotation: + total_annotations_number: + type: string + readOnly: true + config_suitable_for_bulk_annotation: type: boolean - description: Allow annotators to submit empty annotations + readOnly: true + description: Flag to detect is project ready for bulk annotation + assignment_settings: + $ref: '#/components/schemas/AssignmentSettings' + members: + type: string + readOnly: true + ground_truth_number: + type: integer + readOnly: true + description: Honeypot annotation number in project + comment_classification_config: + type: string + annotator_evaluation_minimum_tasks: + type: integer + minimum: 0 + nullable: true + default: 10 + description_short: + type: string + readOnly: true annotator_evaluation_minimum_score: type: string format: decimal pattern: ^-?\d{0,3}(?:\.\d{0,2})?$ nullable: true default: '95.00' - description: - type: string - nullable: true - description: Project description - pause_on_failed_annotator_evaluation: - type: boolean - nullable: true - default: false - allow_stream: - type: string - readOnly: true - parsed_label_config: - readOnly: true - description: JSON-formatted labeling configuration required: - allow_stream - assignment_settings diff --git a/src/label_studio_sdk/types/all_roles_project_list.py b/src/label_studio_sdk/types/all_roles_project_list.py index 52617c99b..774541f19 100644 --- a/src/label_studio_sdk/types/all_roles_project_list.py +++ b/src/label_studio_sdk/types/all_roles_project_list.py @@ -2,14 +2,14 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +import datetime as dt import pydantic -from .user_simple import UserSimple -from .assignment_settings import AssignmentSettings +from .review_settings import ReviewSettings from .all_roles_project_list_sampling import AllRolesProjectListSampling -import datetime as dt -from .all_roles_project_list_skip_queue import AllRolesProjectListSkipQueue from .blueprint_list import BlueprintList -from .review_settings import ReviewSettings +from .user_simple import UserSimple +from .all_roles_project_list_skip_queue import AllRolesProjectListSkipQueue +from .assignment_settings import AssignmentSettings from ..core.pydantic_utilities import IS_PYDANTIC_V2 @@ -19,152 +19,149 @@ class AllRolesProjectList(UncheckedBaseModel): make sure, that you use correct one(Project.objects.with_counts()) """ - show_ground_truth_first: typing.Optional[bool] = None - rejected: str - label_config: typing.Optional[str] = pydantic.Field(default=None) - """ - Label config in XML format. See more about it in documentation - """ - - show_instruction: typing.Optional[bool] = pydantic.Field(default=None) + show_overlap_first: typing.Optional[bool] = None + pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) """ - Show instructions to the annotator before they start + Pinned date and time """ - duplication_status: typing.Optional[str] = None - control_weights: typing.Optional[typing.Optional[typing.Any]] = None - workspace: str - finished_task_number: int - show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) + allow_stream: str + is_draft: typing.Optional[bool] = pydantic.Field(default=None) """ - Show a skip button in interface and allow annotators to skip the task + Whether or not the project is in the middle of being created """ - created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) + show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) """ - Project owner + If set, the annotator can view model predictions """ - assignment_settings: AssignmentSettings - reviewed_number: str - model_version: typing.Optional[str] = pydantic.Field(default=None) + overlap_cohort_percentage: typing.Optional[int] = None + created_at: dt.datetime + control_weights: typing.Optional[typing.Optional[typing.Any]] = None + duplication_done: typing.Optional[bool] = None + title: typing.Optional[str] = pydantic.Field(default=None) """ - Machine learning model version + Project name. Must be between 3 and 50 characters long. """ - data_types: typing.Optional[typing.Any] = None - description_short: str - queue_left: str - annotation_limit_percent: typing.Optional[str] = None - config_has_control_tags: bool = pydantic.Field() + workspace: str + review_settings: ReviewSettings + num_tasks_with_annotations: str + show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) """ - Flag to detect is project ready for labeling + Show annotation history to annotator """ - total_predictions_number: int - useful_annotation_number: str - custom_script: typing.Optional[str] = None - reviewer_queue_total: str - start_training_on_annotation_update: bool = pydantic.Field() + queue_total: str + prompts: str + has_blueprints: str + show_ground_truth_first: typing.Optional[bool] = None + maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) """ - Start model training after any annotations are submitted or updated + Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) """ - skipped_annotations_number: str + queue_done: str + sampling: typing.Optional[AllRolesProjectListSampling] = None + parsed_label_config: typing.Optional[typing.Any] = None + blueprints: typing.List[BlueprintList] custom_task_lock_ttl: typing.Optional[int] = pydantic.Field(default=None) """ TTL in seconds for task reservations, on new and existing tasks """ - workspace_title: str - sampling: typing.Optional[AllRolesProjectListSampling] = None - reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) + description: typing.Optional[str] = pydantic.Field(default=None) """ - Reveal pre-annotations interactively + Project description """ - id: int - has_blueprints: str - queue_done: str - total_annotations_number: str members_count: str - maximum_annotations: typing.Optional[int] = pydantic.Field(default=None) + show_instruction: typing.Optional[bool] = pydantic.Field(default=None) """ - Maximum number of annotations for one task. If the number of annotations per task is equal or greater to this value, the task is completed (is_labeled=True) + Show instructions to the annotator before they start """ - comment_classification_config: typing.Optional[str] = None - prompts: str - created_at: dt.datetime - ready: str - annotator_evaluation_minimum_tasks: typing.Optional[int] = None - config_suitable_for_bulk_annotation: bool = pydantic.Field() + evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) """ - Flag to detect is project ready for bulk annotation + Retrieve and display predictions when loading a task """ - skip_queue: typing.Optional[AllRolesProjectListSkipQueue] = None - title: typing.Optional[str] = pydantic.Field(default=None) + label_config: typing.Optional[str] = pydantic.Field(default=None) """ - Project name. Must be between 3 and 50 characters long. + Label config in XML format. See more about it in documentation """ - show_overlap_first: typing.Optional[bool] = None - queue_total: str + finished_task_number: int + useful_annotation_number: str + queue_left: str + annotation_limit_count: typing.Optional[int] = None + reviewer_queue_total: str + custom_script: typing.Optional[str] = None + color: typing.Optional[str] = None + expert_instruction: typing.Optional[str] = pydantic.Field(default=None) + """ + Labeling instructions in HTML format + """ + + require_comment_on_skip: typing.Optional[bool] = None + duplication_status: typing.Optional[str] = None organization: typing.Optional[int] = None - duplication_done: typing.Optional[bool] = None - ground_truth_number: int = pydantic.Field() + created_by: typing.Optional[UserSimple] = pydantic.Field(default=None) """ - Honeypot annotation number in project + Project owner """ - annotation_limit_count: typing.Optional[int] = None - evaluate_predictions_automatically: typing.Optional[bool] = pydantic.Field(default=None) + id: int + task_number: int = pydantic.Field() """ - Retrieve and display predictions when loading a task + Total task number in project """ - blueprints: typing.List[BlueprintList] - color: typing.Optional[str] = None - review_settings: ReviewSettings - pinned_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) + model_version: typing.Optional[str] = pydantic.Field(default=None) """ - Pinned date and time + Machine learning model version """ - members: str - require_comment_on_skip: typing.Optional[bool] = None - show_annotation_history: typing.Optional[bool] = pydantic.Field(default=None) + enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) """ - Show annotation history to annotator + Allow annotators to submit empty annotations """ - task_number: int = pydantic.Field() + start_training_on_annotation_update: bool = pydantic.Field() """ - Total task number in project + Start model training after any annotations are submitted or updated """ - is_published: typing.Optional[bool] = pydantic.Field(default=None) + data_types: typing.Optional[typing.Any] = None + config_has_control_tags: bool = pydantic.Field() """ - Whether or not the project is published to annotators + Flag to detect is project ready for labeling """ - show_collab_predictions: typing.Optional[bool] = pydantic.Field(default=None) + skipped_annotations_number: str + total_predictions_number: int + ready: str + rejected: str + skip_queue: typing.Optional[AllRolesProjectListSkipQueue] = None + reveal_preannotations_interactively: typing.Optional[bool] = pydantic.Field(default=None) """ - If set, the annotator can view model predictions + Reveal pre-annotations interactively """ + pause_on_failed_annotator_evaluation: typing.Optional[bool] = None + workspace_title: str + reviewed_number: str + annotation_limit_percent: typing.Optional[str] = None review_total_tasks: str - num_tasks_with_annotations: str - expert_instruction: typing.Optional[str] = pydantic.Field(default=None) + is_published: typing.Optional[bool] = pydantic.Field(default=None) """ - Labeling instructions in HTML format + Whether or not the project is published to annotators """ - overlap_cohort_percentage: typing.Optional[int] = None - is_draft: typing.Optional[bool] = pydantic.Field(default=None) + show_skip_button: typing.Optional[bool] = pydantic.Field(default=None) """ - Whether or not the project is in the middle of being created + Show a skip button in interface and allow annotators to skip the task """ min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None) @@ -172,20 +169,23 @@ class AllRolesProjectList(UncheckedBaseModel): Minimum number of completed tasks after which model training is started """ - enable_empty_annotation: typing.Optional[bool] = pydantic.Field(default=None) + total_annotations_number: str + config_suitable_for_bulk_annotation: bool = pydantic.Field() """ - Allow annotators to submit empty annotations + Flag to detect is project ready for bulk annotation """ - annotator_evaluation_minimum_score: typing.Optional[str] = None - description: typing.Optional[str] = pydantic.Field(default=None) + assignment_settings: AssignmentSettings + members: str + ground_truth_number: int = pydantic.Field() """ - Project description + Honeypot annotation number in project """ - pause_on_failed_annotator_evaluation: typing.Optional[bool] = None - allow_stream: str - parsed_label_config: typing.Optional[typing.Any] = None + comment_classification_config: typing.Optional[str] = None + annotator_evaluation_minimum_tasks: typing.Optional[int] = None + description_short: str + annotator_evaluation_minimum_score: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/tests/test_prompts.py b/tests/test_prompts.py index da3aaf9da..dd57f783f 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -213,79 +213,79 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "previous": "http://api.example.org/accounts/?page=2", "results": [ { - "show_ground_truth_first": True, - "rejected": "rejected", - "label_config": "label_config", - "show_instruction": True, - "duplication_status": "duplication_status", + "show_overlap_first": True, + "pinned_at": "2024-01-15T09:30:00Z", + "allow_stream": "allow_stream", + "is_draft": True, + "show_collab_predictions": True, + "overlap_cohort_percentage": 1, + "created_at": "2024-01-15T09:30:00Z", "control_weights": {"key": "value"}, + "duplication_done": True, + "title": "title", "workspace": "workspace", - "finished_task_number": 1, - "show_skip_button": True, - "created_by": {"id": 1, "avatar": "avatar"}, - "assignment_settings": {"id": 1}, - "reviewed_number": "reviewed_number", - "model_version": "model_version", - "data_types": {"key": "value"}, - "description_short": "description_short", - "queue_left": "queue_left", - "annotation_limit_percent": "annotation_limit_percent", - "config_has_control_tags": True, - "total_predictions_number": 1, - "useful_annotation_number": "useful_annotation_number", - "custom_script": "custom_script", - "reviewer_queue_total": "reviewer_queue_total", - "start_training_on_annotation_update": True, - "skipped_annotations_number": "skipped_annotations_number", - "custom_task_lock_ttl": 1, - "workspace_title": "workspace_title", - "sampling": "Sequential sampling", - "reveal_preannotations_interactively": True, - "id": 1, + "review_settings": {"id": 1, "requeue_rejected_tasks_to_annotator": True}, + "num_tasks_with_annotations": "num_tasks_with_annotations", + "show_annotation_history": True, + "queue_total": "queue_total", + "prompts": "prompts", "has_blueprints": "has_blueprints", - "queue_done": "queue_done", - "total_annotations_number": "total_annotations_number", - "members_count": "members_count", + "show_ground_truth_first": True, "maximum_annotations": 1, - "comment_classification_config": "comment_classification_config", - "prompts": "prompts", - "created_at": "2024-01-15T09:30:00Z", - "ready": "ready", - "annotator_evaluation_minimum_tasks": 1, - "config_suitable_for_bulk_annotation": True, - "skip_queue": "REQUEUE_FOR_ME", - "title": "title", - "show_overlap_first": True, - "queue_total": "queue_total", - "organization": 1, - "duplication_done": True, - "ground_truth_number": 1, - "annotation_limit_count": 1, - "evaluate_predictions_automatically": True, + "queue_done": "queue_done", + "sampling": "Sequential sampling", + "parsed_label_config": {"key": "value"}, "blueprints": [ {"id": 1, "share_id": "share_id", "short_url": "short_url", "created_at": "2024-01-15T09:30:00Z"} ], + "custom_task_lock_ttl": 1, + "description": "description", + "members_count": "members_count", + "show_instruction": True, + "evaluate_predictions_automatically": True, + "label_config": "label_config", + "finished_task_number": 1, + "useful_annotation_number": "useful_annotation_number", + "queue_left": "queue_left", + "annotation_limit_count": 1, + "reviewer_queue_total": "reviewer_queue_total", + "custom_script": "custom_script", "color": "color", - "review_settings": {"id": 1, "requeue_rejected_tasks_to_annotator": True}, - "pinned_at": "2024-01-15T09:30:00Z", - "members": "members", + "expert_instruction": "expert_instruction", "require_comment_on_skip": True, - "show_annotation_history": True, + "duplication_status": "duplication_status", + "organization": 1, + "created_by": {"id": 1, "avatar": "avatar"}, + "id": 1, "task_number": 1, - "is_published": True, - "show_collab_predictions": True, + "model_version": "model_version", + "enable_empty_annotation": True, + "start_training_on_annotation_update": True, + "data_types": {"key": "value"}, + "config_has_control_tags": True, + "skipped_annotations_number": "skipped_annotations_number", + "total_predictions_number": 1, + "ready": "ready", + "rejected": "rejected", + "skip_queue": "REQUEUE_FOR_ME", + "reveal_preannotations_interactively": True, + "pause_on_failed_annotator_evaluation": True, + "workspace_title": "workspace_title", + "reviewed_number": "reviewed_number", + "annotation_limit_percent": "annotation_limit_percent", "review_total_tasks": "review_total_tasks", - "num_tasks_with_annotations": "num_tasks_with_annotations", - "expert_instruction": "expert_instruction", - "overlap_cohort_percentage": 1, - "is_draft": True, + "is_published": True, + "show_skip_button": True, "min_annotations_to_start_training": 1, - "enable_empty_annotation": True, + "total_annotations_number": "total_annotations_number", + "config_suitable_for_bulk_annotation": True, + "assignment_settings": {"id": 1}, + "members": "members", + "ground_truth_number": 1, + "comment_classification_config": "comment_classification_config", + "annotator_evaluation_minimum_tasks": 1, + "description_short": "description_short", "annotator_evaluation_minimum_score": "annotator_evaluation_minimum_score", - "description": "description", - "pause_on_failed_annotator_evaluation": True, - "allow_stream": "allow_stream", - "parsed_label_config": {"key": "value"}, } ], } @@ -297,80 +297,80 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "list", { 0: { - "show_ground_truth_first": None, - "rejected": None, - "label_config": None, - "show_instruction": None, - "duplication_status": None, + "show_overlap_first": None, + "pinned_at": "datetime", + "allow_stream": None, + "is_draft": None, + "show_collab_predictions": None, + "overlap_cohort_percentage": "integer", + "created_at": "datetime", "control_weights": None, + "duplication_done": None, + "title": None, "workspace": None, - "finished_task_number": "integer", - "show_skip_button": None, - "created_by": {"id": "integer", "avatar": None}, - "assignment_settings": {"id": "integer"}, - "reviewed_number": None, - "model_version": None, - "data_types": None, - "description_short": None, - "queue_left": None, - "annotation_limit_percent": None, - "config_has_control_tags": None, - "total_predictions_number": "integer", - "useful_annotation_number": None, - "custom_script": None, - "reviewer_queue_total": None, - "start_training_on_annotation_update": None, - "skipped_annotations_number": None, - "custom_task_lock_ttl": "integer", - "workspace_title": None, - "sampling": None, - "reveal_preannotations_interactively": None, - "id": "integer", + "review_settings": {"id": "integer", "requeue_rejected_tasks_to_annotator": None}, + "num_tasks_with_annotations": None, + "show_annotation_history": None, + "queue_total": None, + "prompts": None, "has_blueprints": None, - "queue_done": None, - "total_annotations_number": None, - "members_count": None, + "show_ground_truth_first": None, "maximum_annotations": "integer", - "comment_classification_config": None, - "prompts": None, - "created_at": "datetime", - "ready": None, - "annotator_evaluation_minimum_tasks": "integer", - "config_suitable_for_bulk_annotation": None, - "skip_queue": None, - "title": None, - "show_overlap_first": None, - "queue_total": None, - "organization": "integer", - "duplication_done": None, - "ground_truth_number": "integer", - "annotation_limit_count": "integer", - "evaluate_predictions_automatically": None, + "queue_done": None, + "sampling": None, + "parsed_label_config": None, "blueprints": ( "list", {0: {"id": "integer", "share_id": None, "short_url": None, "created_at": "datetime"}}, ), + "custom_task_lock_ttl": "integer", + "description": None, + "members_count": None, + "show_instruction": None, + "evaluate_predictions_automatically": None, + "label_config": None, + "finished_task_number": "integer", + "useful_annotation_number": None, + "queue_left": None, + "annotation_limit_count": "integer", + "reviewer_queue_total": None, + "custom_script": None, "color": None, - "review_settings": {"id": "integer", "requeue_rejected_tasks_to_annotator": None}, - "pinned_at": "datetime", - "members": None, + "expert_instruction": None, "require_comment_on_skip": None, - "show_annotation_history": None, + "duplication_status": None, + "organization": "integer", + "created_by": {"id": "integer", "avatar": None}, + "id": "integer", "task_number": "integer", - "is_published": None, - "show_collab_predictions": None, + "model_version": None, + "enable_empty_annotation": None, + "start_training_on_annotation_update": None, + "data_types": None, + "config_has_control_tags": None, + "skipped_annotations_number": None, + "total_predictions_number": "integer", + "ready": None, + "rejected": None, + "skip_queue": None, + "reveal_preannotations_interactively": None, + "pause_on_failed_annotator_evaluation": None, + "workspace_title": None, + "reviewed_number": None, + "annotation_limit_percent": None, "review_total_tasks": None, - "num_tasks_with_annotations": None, - "expert_instruction": None, - "overlap_cohort_percentage": "integer", - "is_draft": None, + "is_published": None, + "show_skip_button": None, "min_annotations_to_start_training": "integer", - "enable_empty_annotation": None, + "total_annotations_number": None, + "config_suitable_for_bulk_annotation": None, + "assignment_settings": {"id": "integer"}, + "members": None, + "ground_truth_number": "integer", + "comment_classification_config": None, + "annotator_evaluation_minimum_tasks": "integer", + "description_short": None, "annotator_evaluation_minimum_score": None, - "description": None, - "pause_on_failed_annotator_evaluation": None, - "allow_stream": None, - "parsed_label_config": None, } }, ),