Skip to content

Commit 46823fe

Browse files
timmarkhuffTim Huff
andauthored
Changing default confidence threshold for new detectors from 0.9 to 0.75 (#212)
* changing default confidence threshold from 0.9 to 0.75 * removing unneeded file * bumping version * bumping version to 0.16.0 --------- Co-authored-by: Tim Huff <tim@groundlight.ai>
1 parent 3961b14 commit 46823fe

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

generated/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
7979
name="name_example",
8080
query="query_example",
8181
group_name="group_name_example",
82-
confidence_threshold=0.9,
82+
confidence_threshold=0.75,
8383
pipeline_config="pipeline_config_example",
8484
metadata="metadata_example",
8585
) # DetectorCreationInput |

generated/docs/Detector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**name** | **str** | A short, descriptive name for the detector. |
1212
**query** | **str** | A question about the image. | [readonly]
1313
**group_name** | **str** | Which group should this detector be part of? | [readonly]
14-
**confidence_threshold** | **float** | If the detector&#39;s prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9
14+
**confidence_threshold** | **float** | If the detector&#39;s prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.75
1515
**metadata** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string. | [optional]
1616
**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]
1717

generated/docs/DetectorCreationInput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**name** | **str** | A short, descriptive name for the detector. |
99
**query** | **str** | A question about the image. |
1010
**group_name** | **str** | Which group should this detector be part of? | [optional]
11-
**confidence_threshold** | **float** | If the detector&#39;s prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9
11+
**confidence_threshold** | **float** | If the detector&#39;s prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.75
1212
**pipeline_config** | **str, none_type** | (Advanced usage) Configuration to instantiate a specific prediction pipeline. | [optional]
1313
**metadata** | **str, none_type** | A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string. | [optional]
1414
**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]

generated/docs/DetectorsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
5252
name="name_example",
5353
query="query_example",
5454
group_name="group_name_example",
55-
confidence_threshold=0.9,
55+
confidence_threshold=0.75,
5656
pipeline_config="pipeline_config_example",
5757
metadata="metadata_example",
5858
) # DetectorCreationInput |

generated/groundlight_openapi_client/model/detector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _from_openapi_data(cls, id, type, created_at, name, query, group_name, *args
197197
Animal class but this time we won't travel
198198
through its discriminator because we passed in
199199
_visited_composed_classes = (Animal,)
200-
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501
200+
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.75 # noqa: E501
201201
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string.. [optional] # noqa: E501
202202
"""
203203

@@ -292,7 +292,7 @@ def __init__(self, name, *args, **kwargs): # noqa: E501
292292
Animal class but this time we won't travel
293293
through its discriminator because we passed in
294294
_visited_composed_classes = (Animal,)
295-
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501
295+
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.75 # noqa: E501
296296
metadata ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string.. [optional] # noqa: E501
297297
"""
298298

generated/groundlight_openapi_client/model/detector_creation_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501
178178
through its discriminator because we passed in
179179
_visited_composed_classes = (Animal,)
180180
group_name (str): Which group should this detector be part of?. [optional] # noqa: E501
181-
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501
181+
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.75 # noqa: E501
182182
pipeline_config (str, none_type): (Advanced usage) Configuration to instantiate a specific prediction pipeline.. [optional] # noqa: E501
183183
metadata (str, none_type): A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string.. [optional] # noqa: E501
184184
"""
@@ -274,7 +274,7 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501
274274
through its discriminator because we passed in
275275
_visited_composed_classes = (Animal,)
276276
group_name (str): Which group should this detector be part of?. [optional] # noqa: E501
277-
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.9 # noqa: E501
277+
confidence_threshold (float): If the detector's prediction is below this confidence threshold, send the image query for human review.. [optional] if omitted the server will use the default value of 0.75 # noqa: E501
278278
pipeline_config (str, none_type): (Advanced usage) Configuration to instantiate a specific prediction pipeline.. [optional] # noqa: E501
279279
metadata (str, none_type): A dictionary of custom key/value metadata to associate with the detector (limited to 1KB). This is encoded as a URL-safe, base64-encoded JSON string.. [optional] # noqa: E501
280280
"""

generated/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: public-api.yaml
3-
# timestamp: 2024-04-04T00:11:29+00:00
3+
# timestamp: 2024-05-28T18:14:08+00:00
44

55
from __future__ import annotations
66

@@ -29,7 +29,7 @@ class DetectorCreationInput(BaseModel):
2929
None, description="Which group should this detector be part of?"
3030
)
3131
confidence_threshold: Optional[confloat(ge=0.0, le=1.0)] = Field(
32-
0.9,
32+
0.75,
3333
description=(
3434
"If the detector's prediction is below this confidence threshold, send the image query for human review."
3535
),
@@ -111,7 +111,7 @@ class Detector(BaseModel):
111111
query: str = Field(..., description="A question about the image.")
112112
group_name: str = Field(..., description="Which group should this detector be part of?")
113113
confidence_threshold: Optional[confloat(ge=0.0, le=1.0)] = Field(
114-
0.9,
114+
0.75,
115115
description=(
116116
"If the detector's prediction is below this confidence threshold, send the image query for human review."
117117
),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ packages = [
99
{include = "**/*.py", from = "src"},
1010
]
1111
readme = "README.md"
12-
version = "0.15.2"
12+
version = "0.16.0"
1313

1414
[tool.poetry.dependencies]
1515
# For certifi, use ">=" instead of "^" since it upgrades its "major version" every year, not really following semver

spec/public-api.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ components:
465465
format: double
466466
maximum: 1.0
467467
minimum: 0.0
468-
default: 0.9
468+
default: 0.75
469469
description:
470470
If the detector's prediction is below this confidence threshold,
471471
send the image query for human review.
@@ -504,7 +504,7 @@ components:
504504
format: double
505505
maximum: 1.0
506506
minimum: 0.0
507-
default: 0.9
507+
default: 0.75
508508
description:
509509
If the detector's prediction is below this confidence threshold,
510510
send the image query for human review.

0 commit comments

Comments
 (0)