From 589ebcc1d7825cf027796d41cab5ca3e5ef2e08e Mon Sep 17 00:00:00 2001 From: nik Date: Tue, 25 Jun 2024 12:12:50 +0100 Subject: [PATCH] Update schema --- fern/generators.yml | 2 +- fern/openapi/openapi.yaml | 302 +++++++++++++++++++++++------------- fern/openapi/overrides.yaml | 212 ++++++++++++++++++++++++- 3 files changed, 405 insertions(+), 111 deletions(-) diff --git a/fern/generators.yml b/fern/generators.yml index f36c32a..d0865d3 100644 --- a/fern/generators.yml +++ b/fern/generators.yml @@ -17,7 +17,7 @@ groups: github: repository: HumanSignal/label-studio-sdk # Specify branch here if you want to push to a specific branch - branch: fern-bot/06-18-2024-1005PM + branch: fern-bot/06-24-2024-1253PM mode: push # mode: pull-request config: diff --git a/fern/openapi/openapi.yaml b/fern/openapi/openapi.yaml index dd05386..29829c9 100644 --- a/fern/openapi/openapi.yaml +++ b/fern/openapi/openapi.yaml @@ -2317,88 +2317,7 @@ paths: ``` requestBody: - content: - application/json: - schema: - title: Project - description: Project - type: object - properties: - title: - title: title - description: Project title - type: string - example: My project - description: - title: description - description: Project description - type: string - example: My first project - label_config: - title: label_config - description: Label config in XML format - type: string - example: [...] - expert_instruction: - title: expert_instruction - description: Labeling instructions to show to the user - type: string - example: Label all cats - show_instruction: - title: show_instruction - description: Show labeling instructions - type: boolean - show_skip_button: - title: show_skip_button - description: Show skip button - type: boolean - enable_empty_annotation: - title: enable_empty_annotation - description: Allow empty annotations - type: boolean - show_annotation_history: - title: show_annotation_history - description: Show annotation history - type: boolean - reveal_preannotations_interactively: - title: reveal_preannotations_interactively - description: Reveal preannotations interactively. If set to True, predictions - will be shown to the user only after selecting the area of - interest - type: boolean - show_collab_predictions: - title: show_collab_predictions - description: Show predictions to annotators - type: boolean - maximum_annotations: - title: maximum_annotations - description: Maximum annotations per task - type: integer - color: - title: color - description: Project color in HEX format - type: string - default: "#FFFFFF" - control_weights: - title: control_weights - description: "Dict of weights for each control tag in metric calculation. Each - control tag (e.g. label or choice) will have its own key in - control weight dict with weight for each label and overall - weight. For example, if a bounding box annotation with a - control tag named my_bbox should be included with 0.33 - weight in agreement calculation, and the first label Car - should be twice as important as Airplane, then you need to - specify: {'my_bbox': {'type': 'RectangleLabels', 'labels': - {'Car': 1.0, 'Airplane': 0.5}, 'overall': 0.33}" - type: object - example: - my_bbox: - type: RectangleLabels - labels: - Car: 1 - Airplaine: 0.5 - overall: 0.33 - required: true + $ref: "#/components/requestBodies/api_projects_createData" responses: "201": description: "" @@ -2578,18 +2497,91 @@ paths: summary: Update project description: Update the project settings for a specific project. requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Project" - required: true + $ref: "#/components/requestBodies/api_projects_createData" responses: "200": description: "" content: application/json: schema: - $ref: "#/components/schemas/Project" + title: Project + description: Project + type: object + properties: + title: + title: title + description: Project title + type: string + example: My project + description: + title: description + description: Project description + type: string + example: My first project + label_config: + title: label_config + description: Label config in XML format + type: string + example: [...] + expert_instruction: + title: expert_instruction + description: Labeling instructions to show to the user + type: string + example: Label all cats + show_instruction: + title: show_instruction + description: Show labeling instructions + type: boolean + show_skip_button: + title: show_skip_button + description: Show skip button + type: boolean + enable_empty_annotation: + title: enable_empty_annotation + description: Allow empty annotations + type: boolean + show_annotation_history: + title: show_annotation_history + description: Show annotation history + type: boolean + reveal_preannotations_interactively: + title: reveal_preannotations_interactively + description: Reveal preannotations interactively. If set to True, predictions + will be shown to the user only after selecting the area of + interest + type: boolean + show_collab_predictions: + title: show_collab_predictions + description: Show predictions to annotators + type: boolean + maximum_annotations: + title: maximum_annotations + description: Maximum annotations per task + type: integer + color: + title: color + description: Project color in HEX format + type: string + default: "#FFFFFF" + control_weights: + title: control_weights + description: "Dict of weights for each control tag in metric calculation. Each + control tag (e.g. label or choice) will have its own key + in control weight dict with weight for each label and + overall weight. For example, if a bounding box annotation + with a control tag named my_bbox should be included with + 0.33 weight in agreement calculation, and the first label + Car should be twice as important as Airplane, then you + need to specify: {'my_bbox': {'type': 'RectangleLabels', + 'labels': {'Car': 1.0, 'Airplane': 0.5}, 'overall': 0.33}" + type: object + example: + my_bbox: + type: RectangleLabels + labels: + Car: 1 + Airplaine: 0.5 + overall: 0.33 tags: - Projects x-fern-sdk-group-name: projects @@ -6342,8 +6334,8 @@ paths: image: https://example.com/image.jpg text: Hello, AI! project: 1 - created_at: 2024-01-15T09:30:00Z - updated_at: 2024-01-15T09:30:00Z + created_at: 2024-06-18T23:45:46.048490Z + updated_at: 2024-06-18T23:45:46.048538Z is_labeled: false overlap: 1 inner_id: 1 @@ -6389,27 +6381,38 @@ paths: examples: response: value: - id: 1 + id: 13 + predictions: [] + annotations: [] + drafts: [] + annotators: [] + inner_id: 2 + cancelled_annotations: 0 + total_annotations: 0 + total_predictions: 0 + completed_at: null + annotations_results: "" + predictions_results: "" + predictions_score: null + file_upload: 6b25fc23-some_3.mp4 + storage_filename: null + annotations_ids: "" + predictions_model_versions: "" + avg_lead_time: null + draft_exists: false + updated_by: [] data: - image: https://example.com/image.jpg - text: Hello, AI! - project: 1 - created_at: 2024-01-15T09:30:00Z - updated_at: 2024-01-15T09:30:00Z + image: /data/upload/1/6b25fc23-some_3.mp4 + meta: {} + created_at: 2024-06-18T23:45:46.048490Z + updated_at: 2024-06-18T23:45:46.048538Z is_labeled: false overlap: 1 - inner_id: 1 - total_annotations: 0 - cancelled_annotations: 0 - total_predictions: 0 comment_count: 0 unresolved_comment_count: 0 - last_comment_updated_at: 2024-01-15T09:30:00Z - updated_by: - - user_id: 1 - file_upload: 42d46c4c-my-pic.jpeg - comment_authors: - - 1 + last_comment_updated_at: null + project: 1 + comment_authors: [] tags: - Tasks x-fern-sdk-group-name: tasks @@ -6444,8 +6447,8 @@ paths: image: https://example.com/image.jpg text: Hello, AI! project: 1 - created_at: 2024-01-15T09:30:00Z - updated_at: 2024-01-15T09:30:00Z + created_at: 2024-06-18T23:45:46.048490Z + updated_at: 2024-06-18T23:45:46.048538Z is_labeled: false overlap: 1 inner_id: 1 @@ -7035,6 +7038,89 @@ servers: - url: http://localhost:8080 components: requestBodies: + api_projects_createData: + content: + application/json: + schema: + title: Project + description: Project + type: object + properties: + title: + title: title + description: Project title + type: string + example: My project + description: + title: description + description: Project description + type: string + example: My first project + label_config: + title: label_config + description: Label config in XML format + type: string + example: [...] + expert_instruction: + title: expert_instruction + description: Labeling instructions to show to the user + type: string + example: Label all cats + show_instruction: + title: show_instruction + description: Show labeling instructions + type: boolean + show_skip_button: + title: show_skip_button + description: Show skip button + type: boolean + enable_empty_annotation: + title: enable_empty_annotation + description: Allow empty annotations + type: boolean + show_annotation_history: + title: show_annotation_history + description: Show annotation history + type: boolean + reveal_preannotations_interactively: + title: reveal_preannotations_interactively + description: Reveal preannotations interactively. If set to True, predictions + will be shown to the user only after selecting the area of + interest + type: boolean + show_collab_predictions: + title: show_collab_predictions + description: Show predictions to annotators + type: boolean + maximum_annotations: + title: maximum_annotations + description: Maximum annotations per task + type: integer + color: + title: color + description: Project color in HEX format + type: string + default: "#FFFFFF" + control_weights: + title: control_weights + description: "Dict of weights for each control tag in metric calculation. Each + control tag (e.g. label or choice) will have its own key in + control weight dict with weight for each label and overall + weight. For example, if a bounding box annotation with a + control tag named my_bbox should be included with 0.33 weight + in agreement calculation, and the first label Car should be + twice as important as Airplane, then you need to specify: + {'my_bbox': {'type': 'RectangleLabels', 'labels': {'Car': 1.0, + 'Airplane': 0.5}, 'overall': 0.33}" + type: object + example: + my_bbox: + type: RectangleLabels + labels: + Car: 1 + Airplaine: 0.5 + overall: 0.33 + required: true WebhookSerializerForUpdate: content: application/json: diff --git a/fern/openapi/overrides.yaml b/fern/openapi/overrides.yaml index 2e007f5..3dcfe8d 100644 --- a/fern/openapi/overrides.yaml +++ b/fern/openapi/overrides.yaml @@ -1597,8 +1597,10 @@ components: annotators: type: array items: - type: integer - description: List of annotators' IDs for this task + anyOf: + - type: integer + - type: object + description: List of annotators for this task inner_id: type: integer description: Inner ID of the task @@ -1670,3 +1672,209 @@ components: items: type: integer description: List of comment authors' IDs for this task + data_manager_task_serializer: + required: + - data + type: object + properties: + id: + title: ID + type: integer + readOnly: true + predictions: + title: Predictions + type: array + readOnly: true + description: Predictions for this task + items: + type: object + title: Prediction object + properties: + result: + type: array + title: Prediction result + items: + type: object + title: Prediction result item + score: + type: number + title: Prediction score + model_version: + type: string + title: Model version + model: + type: object + title: ML Backend instance + model_run: + type: object + title: Model Run instance + task: + type: integer + title: Task ID related to the prediction + project: + type: number + title: Project ID related to the prediction + created_at: + type: string + format: date-time + title: Creation time + updated_at: + type: string + format: date-time + title: Last update time + annotations: + type: array + items: + $ref: "#/components/schemas/AnnotationsDMField" + readOnly: true + default: [] + drafts: + title: Annotation drafts + type: array + readOnly: true + description: Drafts for this task + items: + type: object + title: Draft object + properties: + result: + type: array + title: Draft result + items: + type: object + title: Draft result item + created_at: + type: string + format: date-time + title: Creation time + updated_at: + type: string + format: date-time + title: Last update time + annotators: + title: Annotators + type: array + readOnly: true + description: Annotators who annotated this task + items: + anyOf: + - type: integer + - type: object + inner_id: + title: Inner id + type: integer + cancelled_annotations: + title: Cancelled annotations + type: integer + total_annotations: + title: Total annotations + type: integer + total_predictions: + title: Total predictions + type: integer + completed_at: + title: Completed at + type: string + format: date-time + annotations_results: + title: Annotations results + type: string + readOnly: true + predictions_results: + title: Predictions results + type: string + readOnly: true + predictions_score: + title: Predictions score + type: number + file_upload: + title: File upload + type: string + readOnly: true + storage_filename: + title: Storage filename + type: string + readOnly: true + annotations_ids: + title: Annotations ids + type: string + readOnly: true + predictions_model_versions: + title: Predictions model versions + type: string + readOnly: true + avg_lead_time: + title: Avg lead time + type: number + draft_exists: + title: Draft exists + type: boolean + updated_by: + title: User IDs + type: array + readOnly: true + description: User IDs who updated this task + items: + type: object + title: User IDs + data: + title: Data + description: User imported or uploaded data for a task. Data is formatted + according to the project label config. You can find examples of data + for your project on the Import page in the Label Studio Data Manager + UI. + type: object + meta: + title: Meta + description: Meta is user imported (uploaded) data and can be useful as input + for an ML Backend for embeddings, advanced vectors, and other info. + It is passed to ML during training/predicting steps. + type: object + nullable: true + created_at: + title: Created at + description: Time a task was created + type: string + format: date-time + readOnly: true + updated_at: + title: Updated at + description: Last time a task was updated + type: string + format: date-time + readOnly: true + is_labeled: + title: Is_labeled + description: True if the number of annotations for this task is greater than or + equal to the number of maximum_completions for the project + type: boolean + overlap: + title: Overlap + description: Number of distinct annotators that processed the current task + type: integer + comment_count: + title: Comment count + description: Number of comments in the task including all annotations + type: integer + unresolved_comment_count: + title: Unresolved comment count + description: Number of unresolved comments in the task including all annotations + type: integer + last_comment_updated_at: + title: Last comment updated at + description: When the last comment was updated + type: string + format: date-time + nullable: true + project: + title: Project + description: Project ID for this task + type: integer + nullable: true + comment_authors: + description: Users who wrote comments + type: array + items: + description: Users who wrote comments + type: integer + uniqueItems: true \ No newline at end of file