Skip to content

Commit

Permalink
No longer allows null confidence values
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Apr 11, 2024
1 parent 370edf5 commit 7cd705e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion generated/docs/ClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Our classification result. This result can come from the detector, or a human re
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | What is the predicted label? |
**confidence** | **float, none_type** | On a scale of 0 to 1, how confident are we in the predicted label? | [optional]
**confidence** | **float** | On a scale of 0 to 1, how confident are we in the predicted label? | [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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ def openapi_types():
"""
return {
"label": (str,), # noqa: E501
"confidence": (
float,
none_type,
), # noqa: E501
"confidence": (float,), # noqa: E501
}

@cached_property
Expand Down Expand Up @@ -153,7 +150,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float, none_type): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501
confidence (float): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down Expand Up @@ -244,7 +241,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
confidence (float, none_type): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501
confidence (float): On a scale of 0 to 1, how confident are we in the predicted label?. [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down
2 changes: 1 addition & 1 deletion 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: 2024-04-04T00:11:29+00:00
# timestamp: 2024-04-11T20:35:47+00:00

from __future__ import annotations

Expand Down
1 change: 0 additions & 1 deletion spec/public-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ components:
type: number
maximum: 1
minimum: 0
nullable: true
description:
On a scale of 0 to 1, how confident are we in the predicted
label?
Expand Down

0 comments on commit 7cd705e

Please sign in to comment.