From 126dbd0d41104901fa161eca637386f77a918172 Mon Sep 17 00:00:00 2001 From: Paulina Varshavskaya Date: Mon, 28 Apr 2025 09:13:51 -0700 Subject: [PATCH] Update API spec to include optional count and multiclass mode evaluation results --- .../InlineResponse2001EvaluationResults.md | 11 +++ .../inline_response2001_evaluation_results.py | 77 +++++++++++++++++++ generated/model.py | 2 +- spec/public-api.yaml | 43 +++++++++++ 4 files changed, 132 insertions(+), 1 deletion(-) diff --git a/generated/docs/InlineResponse2001EvaluationResults.md b/generated/docs/InlineResponse2001EvaluationResults.md index ed507395..b73d0ff3 100644 --- a/generated/docs/InlineResponse2001EvaluationResults.md +++ b/generated/docs/InlineResponse2001EvaluationResults.md @@ -6,12 +6,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **eval_timestamp** | **datetime** | | [optional] **total_ground_truth_examples** | **int, none_type** | | [optional] +**total_labeled_examples** | **int, none_type** | | [optional] **kfold_pooled__balanced_accuracy** | **float** | | [optional] **kfold_pooled__positive_accuracy** | **float, none_type** | | [optional] **kfold_pooled__negative_accuracy** | **float, none_type** | | [optional] +**precision__mean** | **float, none_type** | | [optional] +**recall__mean** | **float, none_type** | | [optional] +**roc_auc__mean** | **float, none_type** | | [optional] **balanced_system_accuracies** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **positive_system_accuracies** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **negative_system_accuracies** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**mean_absolute_error__mean** | **float, none_type** | | [optional] +**objdet_precision__mean** | **float, none_type** | | [optional] +**objdet_recall__mean** | **float, none_type** | | [optional] +**objdet_f1_score__mean** | **float, none_type** | | [optional] +**class_accuracies** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**confusion_dict** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] +**num_examples_per_class** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py index e3221b58..9ee33a84 100644 --- a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py +++ b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py @@ -93,6 +93,10 @@ def openapi_types(): int, none_type, ), # noqa: E501 + "total_labeled_examples": ( + int, + none_type, + ), # noqa: E501 "kfold_pooled__balanced_accuracy": (float,), # noqa: E501 "kfold_pooled__positive_accuracy": ( float, @@ -102,6 +106,18 @@ def openapi_types(): float, none_type, ), # noqa: E501 + "precision__mean": ( + float, + none_type, + ), # noqa: E501 + "recall__mean": ( + float, + none_type, + ), # noqa: E501 + "roc_auc__mean": ( + float, + none_type, + ), # noqa: E501 "balanced_system_accuracies": ( {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, @@ -114,6 +130,34 @@ def openapi_types(): {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type, ), # noqa: E501 + "mean_absolute_error__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_precision__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_recall__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_f1_score__mean": ( + float, + none_type, + ), # noqa: E501 + "class_accuracies": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "confusion_dict": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "num_examples_per_class": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 } @cached_property @@ -123,12 +167,23 @@ def discriminator(): attribute_map = { "eval_timestamp": "eval_timestamp", # noqa: E501 "total_ground_truth_examples": "total_ground_truth_examples", # noqa: E501 + "total_labeled_examples": "total_labeled_examples", # noqa: E501 "kfold_pooled__balanced_accuracy": "kfold_pooled__balanced_accuracy", # noqa: E501 "kfold_pooled__positive_accuracy": "kfold_pooled__positive_accuracy", # noqa: E501 "kfold_pooled__negative_accuracy": "kfold_pooled__negative_accuracy", # noqa: E501 + "precision__mean": "precision__mean", # noqa: E501 + "recall__mean": "recall__mean", # noqa: E501 + "roc_auc__mean": "roc_auc__mean", # noqa: E501 "balanced_system_accuracies": "balanced_system_accuracies", # noqa: E501 "positive_system_accuracies": "positive_system_accuracies", # noqa: E501 "negative_system_accuracies": "negative_system_accuracies", # noqa: E501 + "mean_absolute_error__mean": "mean_absolute_error__mean", # noqa: E501 + "objdet_precision__mean": "objdet_precision__mean", # noqa: E501 + "objdet_recall__mean": "objdet_recall__mean", # noqa: E501 + "objdet_f1_score__mean": "objdet_f1_score__mean", # noqa: E501 + "class_accuracies": "class_accuracies", # noqa: E501 + "confusion_dict": "confusion_dict", # noqa: E501 + "num_examples_per_class": "num_examples_per_class", # noqa: E501 } read_only_vars = {} @@ -173,12 +228,23 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) eval_timestamp (datetime): [optional] # noqa: E501 total_ground_truth_examples (int, none_type): [optional] # noqa: E501 + total_labeled_examples (int, none_type): [optional] # noqa: E501 kfold_pooled__balanced_accuracy (float): [optional] # noqa: E501 kfold_pooled__positive_accuracy (float, none_type): [optional] # noqa: E501 kfold_pooled__negative_accuracy (float, none_type): [optional] # noqa: E501 + precision__mean (float, none_type): [optional] # noqa: E501 + recall__mean (float, none_type): [optional] # noqa: E501 + roc_auc__mean (float, none_type): [optional] # noqa: E501 balanced_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 positive_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 negative_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + mean_absolute_error__mean (float, none_type): [optional] # noqa: E501 + objdet_precision__mean (float, none_type): [optional] # noqa: E501 + objdet_recall__mean (float, none_type): [optional] # noqa: E501 + objdet_f1_score__mean (float, none_type): [optional] # noqa: E501 + class_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + confusion_dict ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -265,12 +331,23 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) eval_timestamp (datetime): [optional] # noqa: E501 total_ground_truth_examples (int, none_type): [optional] # noqa: E501 + total_labeled_examples (int, none_type): [optional] # noqa: E501 kfold_pooled__balanced_accuracy (float): [optional] # noqa: E501 kfold_pooled__positive_accuracy (float, none_type): [optional] # noqa: E501 kfold_pooled__negative_accuracy (float, none_type): [optional] # noqa: E501 + precision__mean (float, none_type): [optional] # noqa: E501 + recall__mean (float, none_type): [optional] # noqa: E501 + roc_auc__mean (float, none_type): [optional] # noqa: E501 balanced_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 positive_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 negative_system_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + mean_absolute_error__mean (float, none_type): [optional] # noqa: E501 + objdet_precision__mean (float, none_type): [optional] # noqa: E501 + objdet_recall__mean (float, none_type): [optional] # noqa: E501 + objdet_f1_score__mean (float, none_type): [optional] # noqa: E501 + class_accuracies ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + confusion_dict ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 + num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/model.py b/generated/model.py index bf04bc1a..8050326e 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-04-02T20:50:30+00:00 +# timestamp: 2025-04-28T16:12:43+00:00 from __future__ import annotations diff --git a/spec/public-api.yaml b/spec/public-api.yaml index 528d7cc2..ef97fc5c 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -401,6 +401,9 @@ paths: total_ground_truth_examples: type: integer nullable: true + total_labeled_examples: + type: integer + nullable: true kfold_pooled__balanced_accuracy: type: number format: float @@ -412,6 +415,18 @@ paths: type: number format: float nullable: true + precision__mean: + type: number + format: float + nullable: true + recall__mean: + type: number + format: float + nullable: true + roc_auc__mean: + type: number + format: float + nullable: true balanced_system_accuracies: type: object additionalProperties: true @@ -424,6 +439,34 @@ paths: type: object additionalProperties: true nullable: true + mean_absolute_error__mean: + type: number + format: float + nullable: true + objdet_precision__mean: + type: number + format: float + nullable: true + objdet_recall__mean: + type: number + format: float + nullable: true + objdet_f1_score__mean: + type: number + format: float + nullable: true + class_accuracies: + type: object + additionalProperties: true + nullable: true + confusion_dict: + type: object + additionalProperties: true + nullable: true + num_examples_per_class: + type: object + additionalProperties: true + nullable: true nullable: true description: '' /v1/edge/fetch-model-urls/{detector_id}/: