Skip to content
Merged
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
4 changes: 4 additions & 0 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ docs/BBoxGeometry.md
docs/BBoxGeometryRequest.md
docs/BinaryClassificationResult.md
docs/BlankEnum.md
docs/BoundingBoxModeConfiguration.md
docs/BoundingBoxResult.md
docs/ChannelEnum.md
docs/Condition.md
docs/ConditionRequest.md
Expand Down Expand Up @@ -88,6 +90,8 @@ groundlight_openapi_client/model/b_box_geometry.py
groundlight_openapi_client/model/b_box_geometry_request.py
groundlight_openapi_client/model/binary_classification_result.py
groundlight_openapi_client/model/blank_enum.py
groundlight_openapi_client/model/bounding_box_mode_configuration.py
groundlight_openapi_client/model/bounding_box_result.py
groundlight_openapi_client/model/channel_enum.py
groundlight_openapi_client/model/condition.py
groundlight_openapi_client/model/condition_request.py
Expand Down
6 changes: 6 additions & 0 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ rule_request = RuleRequest(
url="url_example",
include_image=True,
payload_template=None,
last_message_failed=True,
last_failure_error="last_failure_error_example",
last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'),
),
],
) # RuleRequest |
Expand Down Expand Up @@ -127,6 +130,7 @@ Class | Method | HTTP request | Description
*DetectorsApi* | [**get_detector_metrics**](docs/DetectorsApi.md#get_detector_metrics) | **GET** /v1/detectors/{detector_id}/metrics |
*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 |
*EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |
*ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image |
*ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} |
Expand All @@ -148,6 +152,8 @@ Class | Method | HTTP request | Description
- [BBoxGeometryRequest](docs/BBoxGeometryRequest.md)
- [BinaryClassificationResult](docs/BinaryClassificationResult.md)
- [BlankEnum](docs/BlankEnum.md)
- [BoundingBoxModeConfiguration](docs/BoundingBoxModeConfiguration.md)
- [BoundingBoxResult](docs/BoundingBoxResult.md)
- [ChannelEnum](docs/ChannelEnum.md)
- [Condition](docs/Condition.md)
- [ConditionRequest](docs/ConditionRequest.md)
Expand Down
3 changes: 3 additions & 0 deletions generated/docs/ActionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client:
url="url_example",
include_image=True,
payload_template=None,
last_message_failed=True,
last_failure_error="last_failure_error_example",
last_failed_at=dateutil_parser('1970-01-01T00:00:00.00Z'),
),
],
) # RuleRequest |
Expand Down
1 change: 1 addition & 0 deletions generated/docs/BinaryClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**result_type** | **str** | | [optional] if omitted the server will use the default value of "binary_classification"
**from_edge** | **bool** | | [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
13 changes: 13 additions & 0 deletions generated/docs/BoundingBoxModeConfiguration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# BoundingBoxModeConfiguration


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**max_num_bboxes** | **int** | | [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/BoundingBoxResult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# BoundingBoxResult


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | **str** | |
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**result_type** | **str** | | [optional] if omitted the server will use the default value of "bounding_box"
**from_edge** | **bool** | | [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)


1 change: 1 addition & 0 deletions generated/docs/CountingResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**result_type** | **str** | | [optional] if omitted the server will use the default value of "counting"
**from_edge** | **bool** | | [optional]
**greater_than_max** | **bool** | | [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]

Expand Down
2 changes: 1 addition & 1 deletion generated/docs/DetectorCreationInputRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**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]
**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 | [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]
**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]

Expand Down
72 changes: 72 additions & 0 deletions generated/docs/EdgeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,81 @@ All URIs are relative to *https://api.groundlight.ai/device-api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**edge_report_metrics_create**](EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics |
[**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ |


# **edge_report_metrics_create**
> edge_report_metrics_create()



Edge server periodically calls this to report metrics. POST body will have JSON data that we log.

### Example

* Api Key Authentication (ApiToken):

```python
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import edge_api
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 = edge_api.EdgeApi(api_client)

# example, this endpoint has no required or optional parameters
try:
api_instance.edge_report_metrics_create()
except groundlight_openapi_client.ApiException as e:
print("Exception when calling EdgeApi->edge_report_metrics_create: %s\n" % e)
```


### Parameters
This endpoint does not need any parameter.

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | No response body | - |

[[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)

# **get_model_urls**
> EdgeModelInfo get_model_urls(detector_id)

Expand Down
2 changes: 1 addition & 1 deletion generated/docs/ModeEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", ]
**value** | **str** | | must be one of ["BINARY", "COUNT", "MULTI_CLASS", "TEXT", "BOUNDING_BOX", ]

[[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
1 change: 1 addition & 0 deletions generated/docs/MultiClassificationResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**result_type** | **str** | | [optional] if omitted the server will use the default value of "multi_classification"
**from_edge** | **bool** | | [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
2 changes: 1 addition & 1 deletion generated/docs/ResultTypeEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", ]
**value** | **str** | | must be one of ["binary_classification", "counting", "multi_classification", "text_recognition", "bounding_box", ]

[[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
1 change: 1 addition & 0 deletions generated/docs/TextRecognitionResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**confidence** | **float, none_type** | | [optional]
**source** | **str** | | [optional]
**result_type** | **str** | | [optional] if omitted the server will use the default value of "text_recognition"
**from_edge** | **bool** | | [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
3 changes: 3 additions & 0 deletions generated/docs/WebhookAction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Name | Type | Description | Notes
**url** | **str** | |
**include_image** | **bool** | | [optional]
**payload_template** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**last_message_failed** | **bool** | | [optional]
**last_failure_error** | **str, none_type** | | [optional]
**last_failed_at** | **datetime, 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)
Expand Down
3 changes: 3 additions & 0 deletions generated/docs/WebhookActionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Name | Type | Description | Notes
**url** | **str** | |
**include_image** | **bool** | | [optional]
**payload_template** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**last_message_failed** | **bool** | | [optional]
**last_failure_error** | **str, none_type** | | [optional]
**last_failed_at** | **datetime, 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)
Expand Down
79 changes: 79 additions & 0 deletions generated/groundlight_openapi_client/api/edge_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@ def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
self.edge_report_metrics_create_endpoint = _Endpoint(
settings={
"response_type": None,
"auth": ["ApiToken"],
"endpoint_path": "/v1/edge/report-metrics",
"operation_id": "edge_report_metrics_create",
"http_method": "POST",
"servers": None,
},
params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
root_map={
"validations": {},
"allowed_values": {},
"openapi_types": {},
"attribute_map": {},
"location_map": {},
"collection_format_map": {},
},
headers_map={
"accept": [],
"content_type": [],
},
api_client=api_client,
)
self.get_model_urls_endpoint = _Endpoint(
settings={
"response_type": (EdgeModelInfo,),
Expand Down Expand Up @@ -76,6 +100,61 @@ def __init__(self, api_client=None):
api_client=api_client,
)

def edge_report_metrics_create(self, **kwargs):
"""edge_report_metrics_create # noqa: E501

Edge server periodically calls this to report metrics. POST body will have JSON data that we log. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.edge_report_metrics_create(async_req=True)
>>> result = thread.get()


Keyword Args:
_return_http_data_only (bool): response data without head status
code and headers. Default is True.
_preload_content (bool): if False, the urllib3.HTTPResponse object
will be returned without reading/decoding response data.
Default is True.
_request_timeout (int/float/tuple): timeout setting for this request. If
one number provided, it will be total request timeout. It can also
be a pair (tuple) of (connection, read) timeouts.
Default is None.
_check_input_type (bool): specifies if type checking
should be done one the data sent to the server.
Default is True.
_check_return_type (bool): specifies if type checking
should be done one the data received from the server.
Default is True.
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_content_type (str/None): force body content-type.
Default is None and content-type will be predicted by allowed
content-types and body.
_host_index (int/None): specifies the index of the server
that we want to use.
Default is read from the configuration.
async_req (bool): execute request asynchronously

Returns:
None
If the method is called asynchronously, returns the request
thread.
"""
kwargs["async_req"] = kwargs.get("async_req", False)
kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
kwargs["_preload_content"] = kwargs.get("_preload_content", True)
kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
kwargs["_content_type"] = kwargs.get("_content_type")
kwargs["_host_index"] = kwargs.get("_host_index")
return self.edge_report_metrics_create_endpoint.call_with_http_info(**kwargs)

def get_model_urls(self, detector_id, **kwargs):
"""get_model_urls # noqa: E501

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def openapi_types():
), # noqa: E501
"source": (str,), # noqa: E501
"result_type": (str,), # noqa: E501
"from_edge": (bool,), # noqa: E501
}

@cached_property
Expand All @@ -128,6 +129,7 @@ def discriminator():
"confidence": "confidence", # noqa: E501
"source": "source", # noqa: E501
"result_type": "result_type", # noqa: E501
"from_edge": "from_edge", # noqa: E501
}

read_only_vars = {}
Expand Down Expand Up @@ -176,6 +178,7 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501
from_edge (bool): [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down Expand Up @@ -267,6 +270,7 @@ def __init__(self, label, *args, **kwargs): # noqa: E501
confidence (float, none_type): [optional] # noqa: E501
source (str): [optional] # noqa: E501
result_type (str): [optional] if omitted the server will use the default value of "binary_classification" # noqa: E501
from_edge (bool): [optional] # noqa: E501
"""

_check_type = kwargs.pop("_check_type", True)
Expand Down
Loading
Loading