Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions generated/docs/DetectorCreationInputRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Name | Type | Description | Notes
**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
**patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0
**pipeline_config** | **str, none_type** | (Advanced usage) Configuration needed to instantiate a prediction pipeline. | [optional]
**edge_pipeline_config** | **str, none_type** | (Advanced usage) Configuration for the edge inference pipeline. If not specified, the mode's default edge pipeline is used. | [optional]
**metadata** | **str** | Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding. | [optional]
**mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX | [optional]
**mode_configuration** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
Expand Down
1 change: 1 addition & 0 deletions generated/docs/DetectorsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
confidence_threshold=0.9,
patience_time=30.0,
pipeline_config="pipeline_config_example",
edge_pipeline_config="edge_pipeline_config_example",
metadata="metadata_example",
mode=None,
mode_configuration=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ class DetectorCreationInputRequest(ModelNormal):
("pipeline_config",): {
"max_length": 100,
},
("edge_pipeline_config",): {
"max_length": 100,
},
("metadata",): {
"max_length": 1362,
"min_length": 1,
Expand Down Expand Up @@ -145,6 +148,10 @@ def openapi_types():
str,
none_type,
), # noqa: E501
"edge_pipeline_config": (
str,
none_type,
), # noqa: E501
"metadata": (str,), # noqa: E501
"mode": (
bool,
Expand Down Expand Up @@ -185,6 +192,7 @@ def discriminator():
"confidence_threshold": "confidence_threshold", # noqa: E501
"patience_time": "patience_time", # noqa: E501
"pipeline_config": "pipeline_config", # noqa: E501
"edge_pipeline_config": "edge_pipeline_config", # noqa: E501
"metadata": "metadata", # noqa: E501
"mode": "mode", # noqa: E501
"mode_configuration": "mode_configuration", # noqa: E501
Expand Down Expand Up @@ -239,6 +247,7 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501
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
patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501
pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501
edge_pipeline_config (str, none_type): (Advanced usage) Configuration for the edge inference pipeline. If not specified, the mode's default edge pipeline is used.. [optional] # noqa: E501
metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501
mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501
mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
Expand Down Expand Up @@ -337,6 +346,7 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501
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
patience_time (float): How long Groundlight will attempt to generate a confident prediction. [optional] if omitted the server will use the default value of 30.0 # noqa: E501
pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501
edge_pipeline_config (str, none_type): (Advanced usage) Configuration for the edge inference pipeline. If not specified, the mode's default edge pipeline is used.. [optional] # noqa: E501
metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501
mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501
mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
Expand Down
9 changes: 8 additions & 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: 2026-03-10T18:06:07+00:00
# timestamp: 2026-03-14T00:27:37+00:00

from __future__ import annotations

Expand Down Expand Up @@ -412,6 +412,13 @@ class DetectorCreationInputRequest(BaseModel):
pipeline_config: Optional[constr(max_length=100)] = Field(
None, description="(Advanced usage) Configuration needed to instantiate a prediction pipeline."
)
edge_pipeline_config: Optional[constr(max_length=100)] = Field(
None,
description=(
"(Advanced usage) Configuration for the edge inference pipeline. If not specified, the mode's default edge"
" pipeline is used."
),
)
metadata: Optional[constr(min_length=1, max_length=1362)] = Field(
None,
description=(
Expand Down
6 changes: 1 addition & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions spec/public-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,12 @@ components:
description: (Advanced usage) Configuration needed to instantiate a prediction
pipeline.
maxLength: 100
edge_pipeline_config:
type: string
nullable: true
description: (Advanced usage) Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
maxLength: 100
metadata:
type: string
minLength: 1
Expand Down
26 changes: 26 additions & 0 deletions src/groundlight/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ def _prep_create_detector( # noqa: PLR0913 # pylint: disable=too-many-arguments
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
priming_group_id: Optional[str] = None,
) -> Detector:
Expand All @@ -363,6 +364,7 @@ def _prep_create_detector( # noqa: PLR0913 # pylint: disable=too-many-arguments
name=name,
query=query,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
)
if group_name is not None:
detector_creation_input.group_name = group_name
Expand All @@ -388,6 +390,7 @@ def create_detector( # noqa: PLR0913
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
class_names: Optional[Union[List[str], str]] = None,
priming_group_id: Optional[str] = None,
Expand Down Expand Up @@ -441,6 +444,8 @@ def create_detector( # noqa: PLR0913
confident prediction before falling back to human review. Defaults to 30 seconds.
:param pipeline_config: Advanced usage only. Configuration string needed to instantiate a specific
prediction pipeline for this detector.
:param edge_pipeline_config: Advanced usage only. Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
:param metadata: A dictionary or JSON string containing custom key/value pairs to associate with
the detector (limited to 1KB). This metadata can be used to store additional
information like location, purpose, or related system IDs. You can retrieve this
Expand All @@ -464,6 +469,7 @@ def create_detector( # noqa: PLR0913
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -480,6 +486,7 @@ def create_detector( # noqa: PLR0913
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -496,6 +503,7 @@ def create_detector( # noqa: PLR0913
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -511,6 +519,7 @@ def get_or_create_detector( # noqa: PLR0913
group_name: Optional[str] = None,
confidence_threshold: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
) -> Detector:
"""
Expand Down Expand Up @@ -541,6 +550,8 @@ def get_or_create_detector( # noqa: PLR0913
the query may be sent for human review.
:param pipeline_config: Advanced usage only. Configuration string needed to instantiate a specific
prediction pipeline for this detector.
:param edge_pipeline_config: Advanced usage only. Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
:param metadata: A dictionary or JSON string containing custom key/value pairs to associate with
the detector (limited to 1KB). This metadata can be used to store additional
information like location, purpose, or related system IDs. You can retrieve this
Expand All @@ -567,6 +578,7 @@ def get_or_create_detector( # noqa: PLR0913
group_name=group_name,
confidence_threshold=confidence_threshold,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
)

Expand Down Expand Up @@ -1566,6 +1578,7 @@ def create_counting_detector( # noqa: PLR0913 # pylint: disable=too-many-argume
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
priming_group_id: Optional[str] = None,
) -> Detector:
Expand Down Expand Up @@ -1602,6 +1615,8 @@ def create_counting_detector( # noqa: PLR0913 # pylint: disable=too-many-argume
confident prediction before falling back to human review. Defaults to 30 seconds.
:param pipeline_config: Advanced usage only. Configuration string needed to instantiate a specific
prediction pipeline for this detector.
:param edge_pipeline_config: Advanced usage only. Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
:param metadata: A dictionary or JSON string containing custom key/value pairs to associate with
the detector (limited to 1KB). This metadata can be used to store additional
information like location, purpose, or related system IDs. You can retrieve this
Expand All @@ -1620,6 +1635,7 @@ def create_counting_detector( # noqa: PLR0913 # pylint: disable=too-many-argume
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -1643,6 +1659,7 @@ def create_binary_detector( # noqa: PLR0913 # pylint: disable=too-many-argument
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
priming_group_id: Optional[str] = None,
) -> Detector:
Expand Down Expand Up @@ -1671,6 +1688,7 @@ def create_binary_detector( # noqa: PLR0913 # pylint: disable=too-many-argument
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -1687,6 +1705,7 @@ def create_multiclass_detector( # noqa: PLR0913 # pylint: disable=too-many-argu
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
priming_group_id: Optional[str] = None,
) -> Detector:
Expand Down Expand Up @@ -1719,6 +1738,8 @@ def create_multiclass_detector( # noqa: PLR0913 # pylint: disable=too-many-argu
confident prediction before falling back to human review. Defaults to 30 seconds.
:param pipeline_config: Advanced usage only. Configuration string needed to instantiate a specific
prediction pipeline for this detector.
:param edge_pipeline_config: Advanced usage only. Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
:param metadata: A dictionary or JSON string containing custom key/value pairs to associate with
the detector (limited to 1KB). This metadata can be used to store additional
information like location, purpose, or related system IDs. You can retrieve this
Expand All @@ -1737,6 +1758,7 @@ def create_multiclass_detector( # noqa: PLR0913 # pylint: disable=too-many-argu
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand All @@ -1757,6 +1779,7 @@ def create_bounding_box_detector( # noqa: PLR0913 # pylint: disable=too-many-ar
confidence_threshold: Optional[float] = None,
patience_time: Optional[float] = None,
pipeline_config: Optional[str] = None,
edge_pipeline_config: Optional[str] = None,
metadata: Union[dict, str, None] = None,
priming_group_id: Optional[str] = None,
) -> Detector:
Expand Down Expand Up @@ -1795,6 +1818,8 @@ def create_bounding_box_detector( # noqa: PLR0913 # pylint: disable=too-many-ar
confident prediction before falling back to human review. Defaults to 30 seconds.
:param pipeline_config: Advanced usage only. Configuration string needed to instantiate a specific
prediction pipeline for this detector.
:param edge_pipeline_config: Advanced usage only. Configuration for the edge inference pipeline.
If not specified, the mode's default edge pipeline is used.
:param metadata: A dictionary or JSON string containing custom key/value pairs to associate with
the detector (limited to 1KB). This metadata can be used to store additional
information like location, purpose, or related system IDs. You can retrieve this
Expand All @@ -1813,6 +1838,7 @@ def create_bounding_box_detector( # noqa: PLR0913 # pylint: disable=too-many-ar
confidence_threshold=confidence_threshold,
patience_time=patience_time,
pipeline_config=pipeline_config,
edge_pipeline_config=edge_pipeline_config,
metadata=metadata,
priming_group_id=priming_group_id,
)
Expand Down
Loading
Loading