Skip to content

Commit

Permalink
Revert "Merge branch 'version_0.12.0' into ask_confident"
Browse files Browse the repository at this point in the history
This reverts commit c7fd045, reversing
changes made to cec6730.
  • Loading branch information
brandon-groundlight committed Oct 17, 2023
1 parent c7fd045 commit aed7dad
Show file tree
Hide file tree
Showing 16 changed files with 184 additions and 523 deletions.
17 changes: 3 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.rulers": [
100,
120
],
"python.analysis.extraPaths": [
"./generated"
],
"python.formatting.provider": "black",
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": false
}
}
}
"python.analysis.extraPaths": ["./generated"],
"python.formatting.provider": "black"
}
4 changes: 1 addition & 3 deletions generated/docs/ImageQueriesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ with openapi_client.ApiClient(configuration) as api_client:
detector_id = "detector_id_example" # str | Choose a detector by its ID.
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)
patience_time = 3.14 # float | How long to wait for a confident response. (optional)
want_async = "want_async_example" # str | If \"true\" then submitting an image query returns immediately without a result. The result will be computed asynchronously and can be retrieved later. (optional)
body = open('@path/to/image.jpeg', 'rb') # file_type | (optional)

# example passing only required values which don't have defaults set
Expand All @@ -220,7 +219,7 @@ with 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, patience_time=patience_time, want_async=want_async, body=body)
api_response = api_instance.submit_image_query(detector_id, human_review=human_review, patience_time=patience_time, body=body)
pprint(api_response)
except openapi_client.ApiException as e:
print("Exception when calling ImageQueriesApi->submit_image_query: %s\n" % e)
Expand All @@ -234,7 +233,6 @@ Name | Type | Description | Notes
**detector_id** | **str**| Choose a detector by its ID. |
**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]
**patience_time** | **float**| How long to wait for a confident response. | [optional]
**want_async** | **str**| If \"true\" then submitting an image query returns immediately without a result. The result will be computed asynchronously and can be retrieved later. | [optional]
**body** | **file_type**| | [optional]

### Return type
Expand Down
2 changes: 1 addition & 1 deletion generated/docs/ImageQuery.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**query** | **str** | A question about the image. | [readonly]
**detector_id** | **str** | Which detector was used on this image query? | [readonly]
**result_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | What type of result are we returning? | [readonly]
**result** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] [readonly]
**result** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [readonly]
**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)
Expand Down
4 changes: 2 additions & 2 deletions generated/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: public-api.yaml
# timestamp: 2023-10-16T23:29:00+00:00
# timestamp: 2023-08-09T20:46:11+00:00

from __future__ import annotations

Expand Down Expand Up @@ -69,7 +69,7 @@ class ImageQuery(BaseModel):
query: str = Field(..., description="A question about the image.")
detector_id: str = Field(..., description="Which detector was used on this image query?")
result_type: ResultTypeEnum = Field(..., description="What type of result are we returning?")
result: Optional[ClassificationResult] = None
result: ClassificationResult


class PaginatedDetectorList(BaseModel):
Expand Down
5 changes: 0 additions & 5 deletions generated/openapi_client/api/image_queries_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def __init__(self, api_client=None):
"detector_id",
"human_review",
"patience_time",
"want_async",
"body",
],
"required": [
Expand All @@ -150,20 +149,17 @@ def __init__(self, api_client=None):
"detector_id": (str,),
"human_review": (str,),
"patience_time": (float,),
"want_async": (str,),
"body": (file_type,),
},
"attribute_map": {
"detector_id": "detector_id",
"human_review": "human_review",
"patience_time": "patience_time",
"want_async": "want_async",
},
"location_map": {
"detector_id": "query",
"human_review": "query",
"patience_time": "query",
"want_async": "query",
"body": "body",
},
"collection_format_map": {},
Expand Down Expand Up @@ -303,7 +299,6 @@ def submit_image_query(self, detector_id, **kwargs):
Keyword Args:
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]
patience_time (float): How long to wait for a confident response.. [optional]
want_async (str): If \"true\" then submitting an image query returns immediately without a result. The result will be computed asynchronously and can be retrieved later.. [optional]
body (file_type): [optional]
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
Expand Down
8 changes: 5 additions & 3 deletions generated/openapi_client/model/image_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def discriminator():

@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, id, type, created_at, query, detector_id, result_type, *args, **kwargs): # noqa: E501
def _from_openapi_data(
cls, id, type, created_at, query, detector_id, result_type, result, *args, **kwargs
): # noqa: E501
"""ImageQuery - a model defined in OpenAPI
Args:
Expand All @@ -178,6 +180,7 @@ def _from_openapi_data(cls, id, type, created_at, query, detector_id, result_typ
query (str): A question about the image.
detector_id (str): Which detector was used on this image query?
result_type (bool, date, datetime, dict, float, int, list, str, none_type): What type of result are we returning?
result (bool, date, datetime, dict, float, int, list, str, none_type):
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
Expand Down Expand Up @@ -210,7 +213,6 @@ def _from_openapi_data(cls, id, type, created_at, query, detector_id, result_typ
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
result (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down Expand Up @@ -245,6 +247,7 @@ def _from_openapi_data(cls, id, type, created_at, query, detector_id, result_typ
self.query = query
self.detector_id = detector_id
self.result_type = result_type
self.result = result
for var_name, var_value in kwargs.items():
if (
var_name not in self.attribute_map
Expand Down Expand Up @@ -303,7 +306,6 @@ def __init__(self, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
result (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down
Loading

0 comments on commit aed7dad

Please sign in to comment.