diff --git a/generated/docs/ImageQueriesApi.md b/generated/docs/ImageQueriesApi.md index 3d6cd5b8..7f39a4da 100644 --- a/generated/docs/ImageQueriesApi.md +++ b/generated/docs/ImageQueriesApi.md @@ -282,6 +282,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = image_queries_api.ImageQueriesApi(api_client) detector_id = "detector_id_example" # str | Choose a detector by its ID. + confidence_threshold = 0 # float | The confidence threshold for the image query. (optional) human_review = "human_review_example" # str | If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident. (optional) image_query_id = "image_query_id_example" # str | The ID to assign to the created image query. (optional) inspection_id = "inspection_id_example" # str | Associate the image query with an inspection. (optional) @@ -300,7 +301,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set # and optional values try: - api_response = api_instance.submit_image_query(detector_id, human_review=human_review, image_query_id=image_query_id, inspection_id=inspection_id, metadata=metadata, patience_time=patience_time, want_async=want_async, body=body) + api_response = api_instance.submit_image_query(detector_id, confidence_threshold=confidence_threshold, human_review=human_review, image_query_id=image_query_id, inspection_id=inspection_id, metadata=metadata, patience_time=patience_time, want_async=want_async, body=body) pprint(api_response) except groundlight_openapi_client.ApiException as e: print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e) @@ -312,6 +313,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **detector_id** | **str**| Choose a detector by its ID. | + **confidence_threshold** | **float**| The confidence threshold for the image query. | [optional] **human_review** | **str**| If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident. | [optional] **image_query_id** | **str**| The ID to assign to the created image query. | [optional] **inspection_id** | **str**| Associate the image query with an inspection. | [optional] diff --git a/generated/groundlight_openapi_client/api/image_queries_api.py b/generated/groundlight_openapi_client/api/image_queries_api.py index d9925f9d..cd8d0577 100644 --- a/generated/groundlight_openapi_client/api/image_queries_api.py +++ b/generated/groundlight_openapi_client/api/image_queries_api.py @@ -170,6 +170,7 @@ def __init__(self, api_client=None): params_map={ "all": [ "detector_id", + "confidence_threshold", "human_review", "image_query_id", "inspection_id", @@ -183,13 +184,21 @@ def __init__(self, api_client=None): ], "nullable": [], "enum": [], - "validation": [], + "validation": [ + "confidence_threshold", + ], }, root_map={ - "validations": {}, + "validations": { + ("confidence_threshold",): { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, + }, "allowed_values": {}, "openapi_types": { "detector_id": (str,), + "confidence_threshold": (float,), "human_review": (str,), "image_query_id": (str,), "inspection_id": (str,), @@ -200,6 +209,7 @@ def __init__(self, api_client=None): }, "attribute_map": { "detector_id": "detector_id", + "confidence_threshold": "confidence_threshold", "human_review": "human_review", "image_query_id": "image_query_id", "inspection_id": "inspection_id", @@ -209,6 +219,7 @@ def __init__(self, api_client=None): }, "location_map": { "detector_id": "query", + "confidence_threshold": "query", "human_review": "query", "image_query_id": "query", "inspection_id": "query", @@ -421,6 +432,7 @@ def submit_image_query(self, detector_id, **kwargs): detector_id (str): Choose a detector by its ID. Keyword Args: + confidence_threshold (float): The confidence threshold for the image query.. [optional] human_review (str): If set to `DEFAULT`, use the regular escalation logic (i.e., send the image query for human review if the ML model is not confident). If set to `ALWAYS`, always send the image query for human review even if the ML model is confident. If set to `NEVER`, never send the image query for human review even if the ML model is not confident.. [optional] image_query_id (str): The ID to assign to the created image query.. [optional] inspection_id (str): Associate the image query with an inspection.. [optional] diff --git a/generated/groundlight_openapi_client/model/counting_result.py b/generated/groundlight_openapi_client/model/counting_result.py index 1bc61441..774cabce 100644 --- a/generated/groundlight_openapi_client/model/counting_result.py +++ b/generated/groundlight_openapi_client/model/counting_result.py @@ -64,6 +64,9 @@ class CountingResult(ModelNormal): } validations = { + ("count",): { + "inclusive_minimum": 0, + }, ("confidence",): { "inclusive_maximum": 1.0, "inclusive_minimum": 0.0, diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 251cb75d..64534047 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -33,10 +34,9 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum from groundlight_openapi_client.model.status_enum import StatusEnum - - globals()["BlankEnum"] = BlankEnum - globals()["EscalationTypeEnum"] = EscalationTypeEnum - globals()["StatusEnum"] = StatusEnum + globals()['BlankEnum'] = BlankEnum + globals()['EscalationTypeEnum'] = EscalationTypeEnum + globals()['StatusEnum'] = StatusEnum class PatchedDetectorRequest(ModelNormal): @@ -63,20 +63,21 @@ class PatchedDetectorRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 200, - "min_length": 1, + ('name',): { + 'max_length': 200, + 'min_length': 1, }, - ("confidence_threshold",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence_threshold',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, - ("patience_time",): { - "inclusive_maximum": 3600, - "inclusive_minimum": 0, + ('patience_time',): { + 'inclusive_maximum': 3600, + 'inclusive_minimum': 0, }, } @@ -87,17 +88,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -113,46 +104,28 @@ def openapi_types(): """ lazy_import() return { - "name": (str,), # noqa: E501 - "confidence_threshold": (float,), # noqa: E501 - "patience_time": (float,), # noqa: E501 - "status": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "escalation_type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + 'name': (str,), # noqa: E501 + 'confidence_threshold': (float,), # noqa: E501 + 'patience_time': (float,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'escalation_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "confidence_threshold": "confidence_threshold", # noqa: E501 - "patience_time": "patience_time", # noqa: E501 - "status": "status", # noqa: E501 - "escalation_type": "escalation_type", # noqa: E501 + 'name': 'name', # noqa: E501 + 'confidence_threshold': 'confidence_threshold', # noqa: E501 + 'patience_time': 'patience_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'escalation_type': 'escalation_type', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -199,18 +172,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -226,24 +198,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -288,16 +258,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 escalation_type (bool, date, datetime, dict, float, int, list, str, none_type): Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING. [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -313,17 +282,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/model.py b/generated/model.py index a6de6439..205300f6 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2024-12-05T21:27:07+00:00 +# timestamp: 2024-12-05T23:53:32+00:00 from __future__ import annotations @@ -200,7 +200,7 @@ class BinaryClassificationResult(BaseModel): class CountingResult(BaseModel): confidence: Optional[confloat(ge=0.0, le=1.0)] = None source: Optional[Source] = None - count: int + count: conint(ge=0) greater_than_max: Optional[bool] = None