You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add edge_pipeline_config parameter to detector creation (#415)
## Summary
Adds support for the `edge_pipeline_config` parameter when creating
detectors, mirroring the existing `pipeline_config` parameter. This
allows callers to specify which pipeline config to use for edge
inference instead of always using the mode's default.
Corresponds to the backend change in zuuul, PR #6056.
## Changes
- Updated `spec/public-api.yaml` with the new `edge_pipeline_config`
field on `DetectorCreationInputRequest`
- Ran `make generate` to regenerate the OpenAPI client models
- Added `edge_pipeline_config` parameter to all detector creation
methods in `client.py` and `experimental_api.py`:
- `_prep_create_detector`
- `create_detector`
- `get_or_create_detector`
- `create_binary_detector`
- `create_counting_detector`
- `create_multiclass_detector`
- `create_bounding_box_detector`
- `create_text_recognition_detector` (ExperimentalApi)
## Testing
Tested end-to-end against an eksdev environment running the zuuul branch
from #6056:
```python
from groundlight import Groundlight
gl = Groundlight()
det = gl.create_detector(
name="edge-config-sdk-test",
query="Is this image relevant?",
pipeline_config="never-review",
edge_pipeline_config="generic-cached-timm-efficientnetv2s-knn",
)
print(f"Created detector: {det.id}")
# Created detector: det_3AuicidzisgV5ja7fFhenB8RSIL
```
---------
Co-authored-by: Ubuntu <ubuntu@ip-10-45-0-232.us-west-2.compute.internal>
Copy file name to clipboardExpand all lines: generated/docs/DetectorCreationInputRequest.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
11
11
**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
12
12
**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
13
13
**pipeline_config** | **str, none_type** | (Advanced usage) Configuration needed to instantiate a prediction pipeline. | [optional]
14
+
**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]
14
15
**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]
15
16
**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]
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
240
248
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
241
249
pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501
250
+
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
242
251
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
243
252
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
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
338
347
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
339
348
pipeline_config (str, none_type): (Advanced usage) Configuration needed to instantiate a prediction pipeline.. [optional] # noqa: E501
349
+
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
340
350
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
341
351
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
0 commit comments