Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f25780c
feat: add PrimingGroup and MLPipeline SDK methods
brandon-wada Mar 27, 2026
2562d6c
Automatically reformatting code
Mar 27, 2026
899960a
feat(priming-group): add is_global field to PrimingGroup model
brandon-wada Mar 27, 2026
dc83316
feat(priming-group): add priming_group_specific_shadow_pipeline_confi…
brandon-wada Apr 1, 2026
f1e3abb
refactor(priming-group): move pipeline and priming group methods to E…
brandon-wada Apr 1, 2026
80de02a
Automatically reformatting code
Apr 1, 2026
d12aae4
regen sdk from public-api.yaml spec
brandon-wada Apr 1, 2026
184d6a0
Automatically reformatting code
Apr 1, 2026
0afd38a
test(priming-group): add real integration tests; add expensive marker
brandon-wada Apr 1, 2026
389b680
Automatically reformatting code
Apr 1, 2026
e02224d
fix(priming-group): use trained_at instead of cached_vizlogic_key in …
brandon-wada Apr 1, 2026
8d49ad7
test(priming-group): add mocked unit tests for create/get/delete prim…
brandon-wada Apr 1, 2026
c8b9d8d
Automatically reformatting code
Apr 1, 2026
be0e45d
fixes
Apr 1, 2026
f6190a6
fix
Apr 1, 2026
7093f04
Update spec docstrings
Apr 7, 2026
cfd7b18
better tests, utilize the generated api
Apr 7, 2026
097ca4f
Automatically reformatting code
Apr 7, 2026
70ec9d8
use mlpipeline api
Apr 7, 2026
9fbd829
Merge branch 'priming_sdk' of github.com:groundlight/python-sdk into …
Apr 7, 2026
92db96d
Merge origin/main and bump version to 0.27.0
brandon-wada Apr 7, 2026
548c487
Merge branch 'priming_sdk' of github.com:groundlight/python-sdk into …
brandon-wada Apr 7, 2026
7ed2b6d
Address PR feedback: fix typo, update docstrings, migrate parse_obj, …
brandon-wada Apr 9, 2026
04228ed
Automatically reformatting code
Apr 9, 2026
26d135a
Trigger CI
brandon-wada Apr 10, 2026
72764d5
Suppress too-many-instance-attributes lint for ExperimentalApi
brandon-wada Apr 10, 2026
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ PYTEST=poetry run pytest -v
# `make test TEST_ARGS="-k some_filter"`
TEST_ARGS=

CLOUD_FILTERS = -m "not run_only_for_edge_endpoint"
EDGE_FILTERS = -m "not skip_for_edge_endpoint"
CLOUD_FILTERS = -m "not run_only_for_edge_endpoint and not expensive"
EDGE_FILTERS = -m "not skip_for_edge_endpoint and not expensive"

# Record information about the slowest 25 tests (but don't show anything slower than 0.1 seconds)
PROFILING_ARGS = \
Expand Down
12 changes: 12 additions & 0 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ docs/Label.md
docs/LabelValue.md
docs/LabelValueRequest.md
docs/LabelsApi.md
docs/MLPipeline.md
docs/ModeEnum.md
docs/MonthToDateAccountInfoApi.md
docs/MultiClassModeConfiguration.md
Expand All @@ -51,10 +52,15 @@ docs/NoteRequest.md
docs/NotesApi.md
docs/PaginatedDetectorList.md
docs/PaginatedImageQueryList.md
docs/PaginatedMLPipelineList.md
docs/PaginatedPrimingGroupList.md
docs/PaginatedRuleList.md
docs/PatchedDetectorRequest.md
docs/PayloadTemplate.md
docs/PayloadTemplateRequest.md
docs/PrimingGroup.md
docs/PrimingGroupCreationInputRequest.md
docs/PrimingGroupsApi.md
docs/ROI.md
docs/ROIRequest.md
docs/ResultTypeEnum.md
Expand Down Expand Up @@ -82,6 +88,7 @@ groundlight_openapi_client/api/image_queries_api.py
groundlight_openapi_client/api/labels_api.py
groundlight_openapi_client/api/month_to_date_account_info_api.py
groundlight_openapi_client/api/notes_api.py
groundlight_openapi_client/api/priming_groups_api.py
groundlight_openapi_client/api/user_api.py
groundlight_openapi_client/api_client.py
groundlight_openapi_client/apis/__init__.py
Expand Down Expand Up @@ -123,17 +130,22 @@ groundlight_openapi_client/model/inline_response200_summary_class_counts.py
groundlight_openapi_client/model/label.py
groundlight_openapi_client/model/label_value.py
groundlight_openapi_client/model/label_value_request.py
groundlight_openapi_client/model/ml_pipeline.py
groundlight_openapi_client/model/mode_enum.py
groundlight_openapi_client/model/multi_class_mode_configuration.py
groundlight_openapi_client/model/multi_classification_result.py
groundlight_openapi_client/model/note.py
groundlight_openapi_client/model/note_request.py
groundlight_openapi_client/model/paginated_detector_list.py
groundlight_openapi_client/model/paginated_image_query_list.py
groundlight_openapi_client/model/paginated_ml_pipeline_list.py
groundlight_openapi_client/model/paginated_priming_group_list.py
groundlight_openapi_client/model/paginated_rule_list.py
groundlight_openapi_client/model/patched_detector_request.py
groundlight_openapi_client/model/payload_template.py
groundlight_openapi_client/model/payload_template_request.py
groundlight_openapi_client/model/priming_group.py
groundlight_openapi_client/model/priming_group_creation_input_request.py
groundlight_openapi_client/model/result_type_enum.py
groundlight_openapi_client/model/roi.py
groundlight_openapi_client/model/roi_request.py
Expand Down
10 changes: 10 additions & 0 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Class | Method | HTTP request | Description
*DetectorsApi* | [**get_detector**](docs/DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
*DetectorsApi* | [**get_detector_evaluation**](docs/DetectorsApi.md#get_detector_evaluation) | **GET** /v1/detectors/{id}/evaluation |
*DetectorsApi* | [**get_detector_metrics**](docs/DetectorsApi.md#get_detector_metrics) | **GET** /v1/detectors/{detector_id}/metrics |
*DetectorsApi* | [**list_detector_pipelines**](docs/DetectorsApi.md#list_detector_pipelines) | **GET** /v1/detectors/{detector_id}/pipelines |
*DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
*DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |
*EdgeApi* | [**edge_report_metrics_create**](docs/EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics |
Expand All @@ -140,6 +141,10 @@ Class | Method | HTTP request | Description
*MonthToDateAccountInfoApi* | [**month_to_date_account_info**](docs/MonthToDateAccountInfoApi.md#month_to_date_account_info) | **GET** /v1/month-to-date-account-info |
*NotesApi* | [**create_note**](docs/NotesApi.md#create_note) | **POST** /v1/notes |
*NotesApi* | [**get_notes**](docs/NotesApi.md#get_notes) | **GET** /v1/notes |
*PrimingGroupsApi* | [**create_priming_group**](docs/PrimingGroupsApi.md#create_priming_group) | **POST** /v1/priming-groups |
*PrimingGroupsApi* | [**delete_priming_group**](docs/PrimingGroupsApi.md#delete_priming_group) | **DELETE** /v1/priming-groups/{id} |
*PrimingGroupsApi* | [**get_priming_group**](docs/PrimingGroupsApi.md#get_priming_group) | **GET** /v1/priming-groups/{id} |
*PrimingGroupsApi* | [**list_priming_groups**](docs/PrimingGroupsApi.md#list_priming_groups) | **GET** /v1/priming-groups |
*UserApi* | [**who_am_i**](docs/UserApi.md#who_am_i) | **GET** /v1/me |


Expand Down Expand Up @@ -180,17 +185,22 @@ Class | Method | HTTP request | Description
- [Label](docs/Label.md)
- [LabelValue](docs/LabelValue.md)
- [LabelValueRequest](docs/LabelValueRequest.md)
- [MLPipeline](docs/MLPipeline.md)
- [ModeEnum](docs/ModeEnum.md)
- [MultiClassModeConfiguration](docs/MultiClassModeConfiguration.md)
- [MultiClassificationResult](docs/MultiClassificationResult.md)
- [Note](docs/Note.md)
- [NoteRequest](docs/NoteRequest.md)
- [PaginatedDetectorList](docs/PaginatedDetectorList.md)
- [PaginatedImageQueryList](docs/PaginatedImageQueryList.md)
- [PaginatedMLPipelineList](docs/PaginatedMLPipelineList.md)
- [PaginatedPrimingGroupList](docs/PaginatedPrimingGroupList.md)
- [PaginatedRuleList](docs/PaginatedRuleList.md)
- [PatchedDetectorRequest](docs/PatchedDetectorRequest.md)
- [PayloadTemplate](docs/PayloadTemplate.md)
- [PayloadTemplateRequest](docs/PayloadTemplateRequest.md)
- [PrimingGroup](docs/PrimingGroup.md)
- [PrimingGroupCreationInputRequest](docs/PrimingGroupCreationInputRequest.md)
- [ROI](docs/ROI.md)
- [ROIRequest](docs/ROIRequest.md)
- [ResultTypeEnum](docs/ResultTypeEnum.md)
Expand Down
94 changes: 94 additions & 0 deletions generated/docs/DetectorsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Method | HTTP request | Description
[**get_detector**](DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
[**get_detector_evaluation**](DetectorsApi.md#get_detector_evaluation) | **GET** /v1/detectors/{id}/evaluation |
[**get_detector_metrics**](DetectorsApi.md#get_detector_metrics) | **GET** /v1/detectors/{detector_id}/metrics |
[**list_detector_pipelines**](DetectorsApi.md#list_detector_pipelines) | **GET** /v1/detectors/{detector_id}/pipelines |
[**list_detectors**](DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
[**update_detector**](DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |

Expand Down Expand Up @@ -401,6 +402,99 @@ Name | Type | Description | Notes
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **list_detector_pipelines**
> PaginatedMLPipelineList list_detector_pipelines(detector_id)



List all MLPipelines for a detector.

### Example

* Api Key Authentication (ApiToken):

```python
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import detectors_api
from groundlight_openapi_client.model.paginated_ml_pipeline_list import PaginatedMLPipelineList
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
host = "https://api.groundlight.ai/device-api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiToken'] = 'Bearer'

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = detectors_api.DetectorsApi(api_client)
detector_id = "detector_id_example" # str |
ordering = "ordering_example" # str | Which field to use when ordering the results. (optional)
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of results to return per page. (optional)
search = "search_example" # str | A search term. (optional)

# example passing only required values which don't have defaults set
try:
api_response = api_instance.list_detector_pipelines(detector_id)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->list_detector_pipelines: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_detector_pipelines(detector_id, ordering=ordering, page=page, page_size=page_size, search=search)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->list_detector_pipelines: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_id** | **str**| |
**ordering** | **str**| Which field to use when ordering the results. | [optional]
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of results to return per page. | [optional]
**search** | **str**| A search term. | [optional]

### Return type

[**PaginatedMLPipelineList**](PaginatedMLPipelineList.md)

### Authorization

[ApiToken](../README.md#ApiToken)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
Expand Down
21 changes: 21 additions & 0 deletions generated/docs/MLPipeline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MLPipeline

A single ML pipeline attached to a detector.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [readonly]
**pipeline_config** | **str, none_type** | configuration needed to instantiate a prediction pipeline. | [readonly]
**is_active_pipeline** | **bool** | If True, this is the pipeline is used for inference, active learning, etc. for its parent Predictor. | [readonly]
**is_edge_pipeline** | **bool** | If True, this pipeline is enabled for edge inference. | [readonly]
**is_unclear_pipeline** | **bool** | If True, this pipeline is used to train classifier for human unclear label prediction. | [readonly]
**is_oodd_pipeline** | **bool** | If True, this pipeline is used for OODD. | [readonly]
**is_enabled** | **bool** | If False, this pipeline will not be run for any use case. | [readonly]
**created_at** | **datetime** | | [readonly]
**trained_at** | **datetime, 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)


15 changes: 15 additions & 0 deletions generated/docs/PaginatedMLPipelineList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PaginatedMLPipelineList


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | |
**results** | [**[MLPipeline]**](MLPipeline.md) | |
**next** | **str, none_type** | | [optional]
**previous** | **str, none_type** | | [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)


15 changes: 15 additions & 0 deletions generated/docs/PaginatedPrimingGroupList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PaginatedPrimingGroupList


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**count** | **int** | |
**results** | [**[PrimingGroup]**](PrimingGroup.md) | |
**next** | **str, none_type** | | [optional]
**previous** | **str, none_type** | | [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)


20 changes: 20 additions & 0 deletions generated/docs/PrimingGroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PrimingGroup

A PrimingGroup owned by the authenticated user.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [readonly]
**name** | **str** | |
**is_global** | **bool** | If True, this priming group is shared to all Groundlight users. Can only be set by Groundlight admins. | [readonly]
**created_at** | **datetime** | | [readonly]
**canonical_query** | **str, none_type** | Canonical semantic query for this priming group | [optional]
**active_pipeline_config** | **str, none_type** | Active pipeline config override for new detectors created in this priming group. If set, this overrides the default active pipeline config at creation time.Can be either a pipeline name or full config string. | [optional]
**priming_group_specific_shadow_pipeline_configs** | **bool, date, datetime, dict, float, int, list, str, none_type** | Configs for shadow pipelines to create for detectors in this priming group. These are added to the default shadow pipeline configs for a detector of the given mode. Each entry is either a pipeline name or full config string. | [optional]
**disable_shadow_pipelines** | **bool** | If True, new detectors added to this priming group will not receive the mode-specific default shadow pipelines from INITIAL_SHADOW_PIPELINE_CONFIG_SET. Priming-group-specific shadow configs still apply. Use this to guarantee the primed active MLBinary is never switched off by a shadow pipeline being promoted. | [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)


16 changes: 16 additions & 0 deletions generated/docs/PrimingGroupCreationInputRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# PrimingGroupCreationInputRequest

Input for creating a new user-owned PrimingGroup seeded from an existing MLPipeline.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | Name for the new priming group. |
**source_ml_pipeline_id** | **str** | ID of an MLPipeline owned by this account whose trained model will seed the priming group. |
**canonical_query** | **str, none_type** | Optional canonical semantic query describing this priming group. | [optional]
**disable_shadow_pipelines** | **bool** | If true, new detectors added to this priming group will not receive the default shadow pipelines. This guarantees the primed active model is never switched off. | [optional] if omitted the server will use the default value of False
**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)


Loading
Loading