diff --git a/config/python.json b/config/python.json index f14146d..6d7e8d3 100644 --- a/config/python.json +++ b/config/python.json @@ -1,6 +1,6 @@ { "projectName": "seldon-deploy-sdk", "packageName": "seldon_deploy_sdk", - "packageVersion": "1.5.0", + "packageVersion": "1.6.0", "packageUrl": "https://deploy.seldon.io" } diff --git a/python/README.md b/python/README.md index 63a3c49..f1380b6 100644 --- a/python/README.md +++ b/python/README.md @@ -4,7 +4,7 @@ API to interact and manage the lifecycle of your machine learning models deploye This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v1alpha1 -- Package version: 1.5.0 +- Package version: 1.6.0 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -156,6 +156,7 @@ Class | Method | HTTP request | Description *PermissionManagementServiceApi* | [**permission_management_service_get_policy_targets**](docs/PermissionManagementServiceApi.md#permission_management_service_get_policy_targets) | **GET** /iam/policy/targets | List all users and groups who have access to the given resource/action pair. The user calling this endpoint must have `grant` access to the given resource. *PermissionManagementServiceApi* | [**permission_management_service_get_user_groups**](docs/PermissionManagementServiceApi.md#permission_management_service_get_user_groups) | **GET** /iam/users/{username}/groups | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. List all groups of a user. The caller must have `read` permission on `system/iam`. *PermissionManagementServiceApi* | [**permission_management_service_get_users**](docs/PermissionManagementServiceApi.md#permission_management_service_get_users) | **GET** /iam/users | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. List users. The caller must have `read` permission on `system/iam`. +*PermissionManagementServiceApi* | [**permission_management_service_reset_user_password**](docs/PermissionManagementServiceApi.md#permission_management_service_reset_user_password) | **POST** /iam/users/{username}/resetPassword | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. *PredictApi* | [**predict_file_inference_service**](docs/PredictApi.md#predict_file_inference_service) | **POST** /namespaces/{namespace}/inferenceservices/{name}/predictfile | *PredictApi* | [**predict_file_seldon_deployment**](docs/PredictApi.md#predict_file_seldon_deployment) | **POST** /namespaces/{namespace}/seldondeployments/{name}/predictfile | *PredictApi* | [**predict_inference_service**](docs/PredictApi.md#predict_inference_service) | **POST** /namespaces/{namespace}/inferenceservices/{name}/predict | @@ -186,7 +187,6 @@ Class | Method | HTTP request | Description - [Affinity](docs/Affinity.md) - [AlibiExplainerSpec](docs/AlibiExplainerSpec.md) - [AlibiExplainerType](docs/AlibiExplainerType.md) - - [AnalyticsProps](docs/AnalyticsProps.md) - [ApplicationLog](docs/ApplicationLog.md) - [ApplicationLogsParams](docs/ApplicationLogsParams.md) - [ApplicationLogsResponse](docs/ApplicationLogsResponse.md) @@ -446,6 +446,7 @@ Class | Method | HTTP request | Description - [V1CreateUserRequest](docs/V1CreateUserRequest.md) - [V1CreateUserResponse](docs/V1CreateUserResponse.md) - [V1DataType](docs/V1DataType.md) + - [V1DefaultProtocol](docs/V1DefaultProtocol.md) - [V1DeleteGroupResponse](docs/V1DeleteGroupResponse.md) - [V1DeletePolicyResponse](docs/V1DeletePolicyResponse.md) - [V1DeleteSecretResponse](docs/V1DeleteSecretResponse.md) @@ -475,7 +476,9 @@ Class | Method | HTTP request | Description - [V1Policy](docs/V1Policy.md) - [V1PredictionSchema](docs/V1PredictionSchema.md) - [V1RcloneConfig](docs/V1RcloneConfig.md) + - [V1ResetUserPasswordResponse](docs/V1ResetUserPasswordResponse.md) - [V1ResourceActionPair](docs/V1ResourceActionPair.md) + - [V1RuntimeDefaults](docs/V1RuntimeDefaults.md) - [V1RuntimeMetadata](docs/V1RuntimeMetadata.md) - [V1RuntimeMetadataListResponse](docs/V1RuntimeMetadataListResponse.md) - [V1S3Credentials](docs/V1S3Credentials.md) diff --git a/python/docs/AnalyticsProps.md b/python/docs/AnalyticsProps.md deleted file mode 100644 index c4997ad..0000000 --- a/python/docs/AnalyticsProps.md +++ /dev/null @@ -1,17 +0,0 @@ -# AnalyticsProps - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**build_time** | **str** | | [optional] -**build_version** | **str** | | [optional] -**git_branch** | **str** | | [optional] -**git_commit** | **str** | | [optional] -**git_status** | **str** | | [optional] -**release_type** | **str** | | [optional] -**distinct_id** | **str** | | [optional] -**token** | **str** | | [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) - - diff --git a/python/docs/BasicDetectorConfiguration.md b/python/docs/BasicDetectorConfiguration.md index 7198ffa..13dc523 100644 --- a/python/docs/BasicDetectorConfiguration.md +++ b/python/docs/BasicDetectorConfiguration.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **drift_batch_size** | **str** | | [optional] +**drift_type_feature** | **bool** | | [optional] **env_secret_ref** | **str** | | [optional] **storage_uri** | **str** | | [optional] diff --git a/python/docs/ModelMetadataServiceApi.md b/python/docs/ModelMetadataServiceApi.md index 481780a..3da9999 100644 --- a/python/docs/ModelMetadataServiceApi.md +++ b/python/docs/ModelMetadataServiceApi.md @@ -114,7 +114,7 @@ Name | Type | Description | Notes [[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) # **model_metadata_service_list_model_metadata** -> V1ModelMetadataListResponse model_metadata_service_list_model_metadata(uri=uri, name=name, version=version, artifact_type=artifact_type, task_type=task_type, model_type=model_type, query=query, page_size=page_size, page_token=page_token, list_mask=list_mask, project=project, order_by=order_by) +> V1ModelMetadataListResponse model_metadata_service_list_model_metadata(uri=uri, name=name, version=version, artifact_type=artifact_type, task_type=task_type, model_type=model_type, query=query, page_size=page_size, page_token=page_token, list_mask=list_mask, project=project, order_by=order_by, default_protocol=default_protocol) List Model Metadata entries. @@ -148,10 +148,11 @@ page_token = 'page_token_example' # str | Optional. A pagination token returned list_mask = 'list_mask_example' # str | Optional. Can be used to specify which fields of Model you wish to return in the response. If left empty all fields will be returned. (optional) project = 'project_example' # str | (optional) order_by = 'order_by_example' # str | The order in which to return the model metadata. The string value should follow SQL syntax: comma separated list of fields. The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. Valid field names include: uri, name, version, project, artifact_type, task_type. (optional) +default_protocol = 'PROTOCOL_UNKNOWN' # str | (optional) (default to PROTOCOL_UNKNOWN) try: # List Model Metadata entries. - api_response = api_instance.model_metadata_service_list_model_metadata(uri=uri, name=name, version=version, artifact_type=artifact_type, task_type=task_type, model_type=model_type, tags=tags, metrics=metrics, query=query, page_size=page_size, page_token=page_token, list_mask=list_mask, project=project, order_by=order_by) + api_response = api_instance.model_metadata_service_list_model_metadata(uri=uri, name=name, version=version, artifact_type=artifact_type, task_type=task_type, model_type=model_type, tags=tags, metrics=metrics, query=query, page_size=page_size, page_token=page_token, list_mask=list_mask, project=project, order_by=order_by, default_protocol=default_protocol) pprint(api_response) except ApiException as e: print("Exception when calling ModelMetadataServiceApi->model_metadata_service_list_model_metadata: %s\n" % e) @@ -175,6 +176,7 @@ Name | Type | Description | Notes **list_mask** | **str**| Optional. Can be used to specify which fields of Model you wish to return in the response. If left empty all fields will be returned. | [optional] **project** | **str**| | [optional] **order_by** | **str**| The order in which to return the model metadata. The string value should follow SQL syntax: comma separated list of fields. The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. Valid field names include: uri, name, version, project, artifact_type, task_type. | [optional] + **default_protocol** | **str**| | [optional] [default to PROTOCOL_UNKNOWN] ### Return type diff --git a/python/docs/PermissionManagementServiceApi.md b/python/docs/PermissionManagementServiceApi.md index 463a6bf..ce72c7a 100644 --- a/python/docs/PermissionManagementServiceApi.md +++ b/python/docs/PermissionManagementServiceApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description [**permission_management_service_get_policy_targets**](PermissionManagementServiceApi.md#permission_management_service_get_policy_targets) | **GET** /iam/policy/targets | List all users and groups who have access to the given resource/action pair. The user calling this endpoint must have `grant` access to the given resource. [**permission_management_service_get_user_groups**](PermissionManagementServiceApi.md#permission_management_service_get_user_groups) | **GET** /iam/users/{username}/groups | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. List all groups of a user. The caller must have `read` permission on `system/iam`. [**permission_management_service_get_users**](PermissionManagementServiceApi.md#permission_management_service_get_users) | **GET** /iam/users | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. List users. The caller must have `read` permission on `system/iam`. +[**permission_management_service_reset_user_password**](PermissionManagementServiceApi.md#permission_management_service_reset_user_password) | **POST** /iam/users/{username}/resetPassword | Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. # **permission_management_service_add_user_to_group** @@ -738,3 +739,53 @@ Name | Type | Description | Notes [[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) +# **permission_management_service_reset_user_password** +> V1ResetUserPasswordResponse permission_management_service_reset_user_password(username) + +Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. + +### Example +```python +from __future__ import print_function +import time +import seldon_deploy_sdk +from seldon_deploy_sdk.rest import ApiException +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +configuration = seldon_deploy_sdk.Configuration() +configuration.access_token = 'YOUR_ACCESS_TOKEN' + +# create an instance of the API class +api_instance = seldon_deploy_sdk.PermissionManagementServiceApi(seldon_deploy_sdk.ApiClient(configuration)) +username = 'username_example' # str | The username of the user to be deleted. + +try: + # Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. + api_response = api_instance.permission_management_service_reset_user_password(username) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionManagementServiceApi->permission_management_service_reset_user_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **str**| The username of the user to be deleted. | + +### Return type + +[**V1ResetUserPasswordResponse**](V1ResetUserPasswordResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/python/docs/V1DefaultProtocol.md b/python/docs/V1DefaultProtocol.md new file mode 100644 index 0000000..c9a5a31 --- /dev/null +++ b/python/docs/V1DefaultProtocol.md @@ -0,0 +1,9 @@ +# V1DefaultProtocol + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/V1Model.md b/python/docs/V1Model.md index c9afb64..55d1256 100644 --- a/python/docs/V1Model.md +++ b/python/docs/V1Model.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **creation_time** | **datetime** | The creation timestamp for the model metadata entry. It is automatically created by the Metadata service and cannot be modified. The timestamp is using the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format/ | [optional] **prediction_schema** | [**V1PredictionSchema**](V1PredictionSchema.md) | The schema defining the inputs/outputs for the given model. | [optional] **project** | **str** | The project that this model belongs to. | [optional] +**runtime_defaults** | [**V1RuntimeDefaults**](V1RuntimeDefaults.md) | Default values used when deploying this model. | [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) diff --git a/python/docs/V1ResetUserPasswordResponse.md b/python/docs/V1ResetUserPasswordResponse.md new file mode 100644 index 0000000..8e7102c --- /dev/null +++ b/python/docs/V1ResetUserPasswordResponse.md @@ -0,0 +1,9 @@ +# V1ResetUserPasswordResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/python/docs/V1RuntimeDefaults.md b/python/docs/V1RuntimeDefaults.md new file mode 100644 index 0000000..5e64641 --- /dev/null +++ b/python/docs/V1RuntimeDefaults.md @@ -0,0 +1,10 @@ +# V1RuntimeDefaults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_protocol** | [**V1DefaultProtocol**](V1DefaultProtocol.md) | The default protocol used for REST/gRPC requests to the model. It is possible that a model can be used with multiple protocols. | [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) + + diff --git a/python/docs/V1RuntimeMetadata.md b/python/docs/V1RuntimeMetadata.md index 0f7fd13..c657c10 100644 --- a/python/docs/V1RuntimeMetadata.md +++ b/python/docs/V1RuntimeMetadata.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **shadow** | **bool** | True if this model is a shadow in the deployment. | [optional] **creation_time** | **datetime** | The creation timestamp for the runtime model metadata entry. It is automatically created by the Metadata service and cannot be modified. The timestamp is using the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format/ | [optional] **model** | [**V1Model**](V1Model.md) | Detailed metadata of the model referenced in this runtime metadata entry. | [optional] +**explainer** | **bool** | True if this model is a explainer in the deployment. | [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) diff --git a/python/licenses/license.txt b/python/licenses/license.txt index f3c0baa..b1326f4 100644 --- a/python/licenses/license.txt +++ b/python/licenses/license.txt @@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. certifi -2021.10.8 +2022.6.15 Mozilla Public License 2.0 (MPL 2.0) This package contains a modified version of ca-bundle.crt: @@ -59,7 +59,7 @@ one at http://mozilla.org/MPL/2.0/. cffi -1.15.0 +1.15.1 MIT License Except when otherwise stated (look for LICENSE files in directories or @@ -90,7 +90,7 @@ documentation is licensed as follows: cryptography -36.0.2 +37.0.4 Apache Software License; BSD License This software is made available under the terms of *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions to cryptography are made @@ -191,7 +191,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The above BSD License Applies to all code, even that also covered by Apache 2.0. seldon-deploy-sdk -1.5.0 +1.6.0 UNKNOWN UNKNOWN @@ -219,7 +219,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. urllib3 -1.26.9 +1.26.12 MIT License MIT License diff --git a/python/licenses/license_info.csv b/python/licenses/license_info.csv index 90bc216..bc1db6b 100644 --- a/python/licenses/license_info.csv +++ b/python/licenses/license_info.csv @@ -1,10 +1,10 @@ "Name","Version","License" "Authlib","0.15.5","BSD License" -"certifi","2021.10.8","Mozilla Public License 2.0 (MPL 2.0)" -"cffi","1.15.0","MIT License" -"cryptography","36.0.2","Apache Software License; BSD License" +"certifi","2022.6.15","Mozilla Public License 2.0 (MPL 2.0)" +"cffi","1.15.1","MIT License" +"cryptography","37.0.4","Apache Software License; BSD License" "pycparser","2.21","BSD License" "python-dateutil","2.8.2","Apache Software License; BSD License" -"seldon-deploy-sdk","1.5.0","UNKNOWN" +"seldon-deploy-sdk","1.6.0","UNKNOWN" "six","1.16.0","MIT License" -"urllib3","1.26.9","MIT License" \ No newline at end of file +"urllib3","1.26.12","MIT License" \ No newline at end of file diff --git a/python/seldon_deploy_sdk/__init__.py b/python/seldon_deploy_sdk/__init__.py index 169b678..ac9321c 100644 --- a/python/seldon_deploy_sdk/__init__.py +++ b/python/seldon_deploy_sdk/__init__.py @@ -47,7 +47,6 @@ from seldon_deploy_sdk.models.affinity import Affinity from seldon_deploy_sdk.models.alibi_explainer_spec import AlibiExplainerSpec from seldon_deploy_sdk.models.alibi_explainer_type import AlibiExplainerType -from seldon_deploy_sdk.models.analytics_props import AnalyticsProps from seldon_deploy_sdk.models.application_log import ApplicationLog from seldon_deploy_sdk.models.application_logs_params import ApplicationLogsParams from seldon_deploy_sdk.models.application_logs_response import ApplicationLogsResponse @@ -307,6 +306,7 @@ from seldon_deploy_sdk.models.v1_create_user_request import V1CreateUserRequest from seldon_deploy_sdk.models.v1_create_user_response import V1CreateUserResponse from seldon_deploy_sdk.models.v1_data_type import V1DataType +from seldon_deploy_sdk.models.v1_default_protocol import V1DefaultProtocol from seldon_deploy_sdk.models.v1_delete_group_response import V1DeleteGroupResponse from seldon_deploy_sdk.models.v1_delete_policy_response import V1DeletePolicyResponse from seldon_deploy_sdk.models.v1_delete_secret_response import V1DeleteSecretResponse @@ -336,7 +336,9 @@ from seldon_deploy_sdk.models.v1_policy import V1Policy from seldon_deploy_sdk.models.v1_prediction_schema import V1PredictionSchema from seldon_deploy_sdk.models.v1_rclone_config import V1RcloneConfig +from seldon_deploy_sdk.models.v1_reset_user_password_response import V1ResetUserPasswordResponse from seldon_deploy_sdk.models.v1_resource_action_pair import V1ResourceActionPair +from seldon_deploy_sdk.models.v1_runtime_defaults import V1RuntimeDefaults from seldon_deploy_sdk.models.v1_runtime_metadata import V1RuntimeMetadata from seldon_deploy_sdk.models.v1_runtime_metadata_list_response import V1RuntimeMetadataListResponse from seldon_deploy_sdk.models.v1_s3_credentials import V1S3Credentials diff --git a/python/seldon_deploy_sdk/api/model_metadata_service_api.py b/python/seldon_deploy_sdk/api/model_metadata_service_api.py index b667f5c..47adb43 100644 --- a/python/seldon_deploy_sdk/api/model_metadata_service_api.py +++ b/python/seldon_deploy_sdk/api/model_metadata_service_api.py @@ -255,6 +255,7 @@ def model_metadata_service_list_model_metadata(self, **kwargs): # noqa: E501 :param str list_mask: Optional. Can be used to specify which fields of Model you wish to return in the response. If left empty all fields will be returned. :param str project: :param str order_by: The order in which to return the model metadata. The string value should follow SQL syntax: comma separated list of fields. The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. Valid field names include: uri, name, version, project, artifact_type, task_type. + :param str default_protocol: :return: V1ModelMetadataListResponse If the method is called asynchronously, returns the request thread. @@ -290,12 +291,13 @@ def model_metadata_service_list_model_metadata_with_http_info(self, **kwargs): :param str list_mask: Optional. Can be used to specify which fields of Model you wish to return in the response. If left empty all fields will be returned. :param str project: :param str order_by: The order in which to return the model metadata. The string value should follow SQL syntax: comma separated list of fields. The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. Valid field names include: uri, name, version, project, artifact_type, task_type. + :param str default_protocol: :return: V1ModelMetadataListResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['uri', 'name', 'version', 'artifact_type', 'task_type', 'model_type', 'tags', 'metrics', 'query', 'page_size', 'page_token', 'list_mask', 'project', 'order_by'] # noqa: E501 + all_params = ['uri', 'name', 'version', 'artifact_type', 'task_type', 'model_type', 'tags', 'metrics', 'query', 'page_size', 'page_token', 'list_mask', 'project', 'order_by', 'default_protocol'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -346,6 +348,8 @@ def model_metadata_service_list_model_metadata_with_http_info(self, **kwargs): query_params.append(('project', params['project'])) # noqa: E501 if 'order_by' in params: query_params.append(('orderBy', params['order_by'])) # noqa: E501 + if 'default_protocol' in params: + query_params.append(('defaultProtocol', params['default_protocol'])) # noqa: E501 header_params = {} diff --git a/python/seldon_deploy_sdk/api/permission_management_service_api.py b/python/seldon_deploy_sdk/api/permission_management_service_api.py index eb7ddc4..48d9170 100644 --- a/python/seldon_deploy_sdk/api/permission_management_service_api.py +++ b/python/seldon_deploy_sdk/api/permission_management_service_api.py @@ -1438,3 +1438,100 @@ def permission_management_service_get_users_with_http_info(self, **kwargs): # n _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def permission_management_service_reset_user_password(self, username, **kwargs): # noqa: E501 + """Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.permission_management_service_reset_user_password(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: The username of the user to be deleted. (required) + :return: V1ResetUserPasswordResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.permission_management_service_reset_user_password_with_http_info(username, **kwargs) # noqa: E501 + else: + (data) = self.permission_management_service_reset_user_password_with_http_info(username, **kwargs) # noqa: E501 + return data + + def permission_management_service_reset_user_password_with_http_info(self, username, **kwargs): # noqa: E501 + """Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.permission_management_service_reset_user_password_with_http_info(username, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str username: The username of the user to be deleted. (required) + :return: V1ResetUserPasswordResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['username'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method permission_management_service_reset_user_password" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'username' is set + if ('username' not in params or + params['username'] is None): + raise ValueError("Missing the required parameter `username` when calling `permission_management_service_reset_user_password`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['OAuth2'] # noqa: E501 + + return self.api_client.call_api( + '/iam/users/{username}/resetPassword', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1ResetUserPasswordResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/python/seldon_deploy_sdk/api_client.py b/python/seldon_deploy_sdk/api_client.py index 5d5cc23..5f3db11 100644 --- a/python/seldon_deploy_sdk/api_client.py +++ b/python/seldon_deploy_sdk/api_client.py @@ -75,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/1.5.0/python' + self.user_agent = 'Swagger-Codegen/1.6.0/python' self.client_side_validation = configuration.client_side_validation def __del__(self): diff --git a/python/seldon_deploy_sdk/configuration.py b/python/seldon_deploy_sdk/configuration.py index 000322a..5b3e056 100644 --- a/python/seldon_deploy_sdk/configuration.py +++ b/python/seldon_deploy_sdk/configuration.py @@ -283,5 +283,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1alpha1\n"\ - "SDK Package Version: 1.5.0".\ + "SDK Package Version: 1.6.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/python/seldon_deploy_sdk/models/__init__.py b/python/seldon_deploy_sdk/models/__init__.py index 76a6440..de6c476 100644 --- a/python/seldon_deploy_sdk/models/__init__.py +++ b/python/seldon_deploy_sdk/models/__init__.py @@ -23,7 +23,6 @@ from seldon_deploy_sdk.models.affinity import Affinity from seldon_deploy_sdk.models.alibi_explainer_spec import AlibiExplainerSpec from seldon_deploy_sdk.models.alibi_explainer_type import AlibiExplainerType -from seldon_deploy_sdk.models.analytics_props import AnalyticsProps from seldon_deploy_sdk.models.application_log import ApplicationLog from seldon_deploy_sdk.models.application_logs_params import ApplicationLogsParams from seldon_deploy_sdk.models.application_logs_response import ApplicationLogsResponse @@ -283,6 +282,7 @@ from seldon_deploy_sdk.models.v1_create_user_request import V1CreateUserRequest from seldon_deploy_sdk.models.v1_create_user_response import V1CreateUserResponse from seldon_deploy_sdk.models.v1_data_type import V1DataType +from seldon_deploy_sdk.models.v1_default_protocol import V1DefaultProtocol from seldon_deploy_sdk.models.v1_delete_group_response import V1DeleteGroupResponse from seldon_deploy_sdk.models.v1_delete_policy_response import V1DeletePolicyResponse from seldon_deploy_sdk.models.v1_delete_secret_response import V1DeleteSecretResponse @@ -312,7 +312,9 @@ from seldon_deploy_sdk.models.v1_policy import V1Policy from seldon_deploy_sdk.models.v1_prediction_schema import V1PredictionSchema from seldon_deploy_sdk.models.v1_rclone_config import V1RcloneConfig +from seldon_deploy_sdk.models.v1_reset_user_password_response import V1ResetUserPasswordResponse from seldon_deploy_sdk.models.v1_resource_action_pair import V1ResourceActionPair +from seldon_deploy_sdk.models.v1_runtime_defaults import V1RuntimeDefaults from seldon_deploy_sdk.models.v1_runtime_metadata import V1RuntimeMetadata from seldon_deploy_sdk.models.v1_runtime_metadata_list_response import V1RuntimeMetadataListResponse from seldon_deploy_sdk.models.v1_s3_credentials import V1S3Credentials diff --git a/python/seldon_deploy_sdk/models/analytics_props.py b/python/seldon_deploy_sdk/models/analytics_props.py deleted file mode 100644 index b2c854a..0000000 --- a/python/seldon_deploy_sdk/models/analytics_props.py +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - Seldon Deploy API - - API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 - - OpenAPI spec version: v1alpha1 - Contact: hello@seldon.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - - -import pprint -import re # noqa: F401 - -import six - - -class AnalyticsProps(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - 'build_time': 'str', - 'build_version': 'str', - 'git_branch': 'str', - 'git_commit': 'str', - 'git_status': 'str', - 'release_type': 'str', - 'distinct_id': 'str', - 'token': 'str' - } - - attribute_map = { - 'build_time': 'BuildTime', - 'build_version': 'BuildVersion', - 'git_branch': 'GitBranch', - 'git_commit': 'GitCommit', - 'git_status': 'GitStatus', - 'release_type': 'ReleaseType', - 'distinct_id': 'distinct_id', - 'token': 'token' - } - - def __init__(self, build_time=None, build_version=None, git_branch=None, git_commit=None, git_status=None, release_type=None, distinct_id=None, token=None): # noqa: E501 - """AnalyticsProps - a model defined in Swagger""" # noqa: E501 - - self._build_time = None - self._build_version = None - self._git_branch = None - self._git_commit = None - self._git_status = None - self._release_type = None - self._distinct_id = None - self._token = None - self.discriminator = None - - if build_time is not None: - self.build_time = build_time - if build_version is not None: - self.build_version = build_version - if git_branch is not None: - self.git_branch = git_branch - if git_commit is not None: - self.git_commit = git_commit - if git_status is not None: - self.git_status = git_status - if release_type is not None: - self.release_type = release_type - if distinct_id is not None: - self.distinct_id = distinct_id - if token is not None: - self.token = token - - @property - def build_time(self): - """Gets the build_time of this AnalyticsProps. # noqa: E501 - - - :return: The build_time of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._build_time - - @build_time.setter - def build_time(self, build_time): - """Sets the build_time of this AnalyticsProps. - - - :param build_time: The build_time of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._build_time = build_time - - @property - def build_version(self): - """Gets the build_version of this AnalyticsProps. # noqa: E501 - - - :return: The build_version of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._build_version - - @build_version.setter - def build_version(self, build_version): - """Sets the build_version of this AnalyticsProps. - - - :param build_version: The build_version of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._build_version = build_version - - @property - def git_branch(self): - """Gets the git_branch of this AnalyticsProps. # noqa: E501 - - - :return: The git_branch of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._git_branch - - @git_branch.setter - def git_branch(self, git_branch): - """Sets the git_branch of this AnalyticsProps. - - - :param git_branch: The git_branch of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._git_branch = git_branch - - @property - def git_commit(self): - """Gets the git_commit of this AnalyticsProps. # noqa: E501 - - - :return: The git_commit of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._git_commit - - @git_commit.setter - def git_commit(self, git_commit): - """Sets the git_commit of this AnalyticsProps. - - - :param git_commit: The git_commit of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._git_commit = git_commit - - @property - def git_status(self): - """Gets the git_status of this AnalyticsProps. # noqa: E501 - - - :return: The git_status of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._git_status - - @git_status.setter - def git_status(self, git_status): - """Sets the git_status of this AnalyticsProps. - - - :param git_status: The git_status of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._git_status = git_status - - @property - def release_type(self): - """Gets the release_type of this AnalyticsProps. # noqa: E501 - - - :return: The release_type of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._release_type - - @release_type.setter - def release_type(self, release_type): - """Sets the release_type of this AnalyticsProps. - - - :param release_type: The release_type of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._release_type = release_type - - @property - def distinct_id(self): - """Gets the distinct_id of this AnalyticsProps. # noqa: E501 - - - :return: The distinct_id of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._distinct_id - - @distinct_id.setter - def distinct_id(self, distinct_id): - """Sets the distinct_id of this AnalyticsProps. - - - :param distinct_id: The distinct_id of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._distinct_id = distinct_id - - @property - def token(self): - """Gets the token of this AnalyticsProps. # noqa: E501 - - - :return: The token of this AnalyticsProps. # noqa: E501 - :rtype: str - """ - return self._token - - @token.setter - def token(self, token): - """Sets the token of this AnalyticsProps. - - - :param token: The token of this AnalyticsProps. # noqa: E501 - :type: str - """ - - self._token = token - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - result[attr] = value - if issubclass(AnalyticsProps, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AnalyticsProps): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/python/seldon_deploy_sdk/models/basic_detector_configuration.py b/python/seldon_deploy_sdk/models/basic_detector_configuration.py index e072c5d..1b3779b 100644 --- a/python/seldon_deploy_sdk/models/basic_detector_configuration.py +++ b/python/seldon_deploy_sdk/models/basic_detector_configuration.py @@ -32,26 +32,31 @@ class BasicDetectorConfiguration(object): """ swagger_types = { 'drift_batch_size': 'str', + 'drift_type_feature': 'bool', 'env_secret_ref': 'str', 'storage_uri': 'str' } attribute_map = { 'drift_batch_size': 'drift_batch_size', + 'drift_type_feature': 'drift_type_feature', 'env_secret_ref': 'env_secret_ref', 'storage_uri': 'storage_uri' } - def __init__(self, drift_batch_size=None, env_secret_ref=None, storage_uri=None): # noqa: E501 + def __init__(self, drift_batch_size=None, drift_type_feature=None, env_secret_ref=None, storage_uri=None): # noqa: E501 """BasicDetectorConfiguration - a model defined in Swagger""" # noqa: E501 self._drift_batch_size = None + self._drift_type_feature = None self._env_secret_ref = None self._storage_uri = None self.discriminator = None if drift_batch_size is not None: self.drift_batch_size = drift_batch_size + if drift_type_feature is not None: + self.drift_type_feature = drift_type_feature if env_secret_ref is not None: self.env_secret_ref = env_secret_ref if storage_uri is not None: @@ -78,6 +83,27 @@ def drift_batch_size(self, drift_batch_size): self._drift_batch_size = drift_batch_size + @property + def drift_type_feature(self): + """Gets the drift_type_feature of this BasicDetectorConfiguration. # noqa: E501 + + + :return: The drift_type_feature of this BasicDetectorConfiguration. # noqa: E501 + :rtype: bool + """ + return self._drift_type_feature + + @drift_type_feature.setter + def drift_type_feature(self, drift_type_feature): + """Sets the drift_type_feature of this BasicDetectorConfiguration. + + + :param drift_type_feature: The drift_type_feature of this BasicDetectorConfiguration. # noqa: E501 + :type: bool + """ + + self._drift_type_feature = drift_type_feature + @property def env_secret_ref(self): """Gets the env_secret_ref of this BasicDetectorConfiguration. # noqa: E501 diff --git a/python/seldon_deploy_sdk/models/v1_artifact_type.py b/python/seldon_deploy_sdk/models/v1_artifact_type.py index a51c5dc..db1f963 100644 --- a/python/seldon_deploy_sdk/models/v1_artifact_type.py +++ b/python/seldon_deploy_sdk/models/v1_artifact_type.py @@ -35,6 +35,7 @@ class V1ArtifactType(object): PYTORCH = "PYTORCH" ONNX = "ONNX" TENSORRT = "TENSORRT" + ALIBI_EXPLAIN = "ALIBI_EXPLAIN" """ Attributes: diff --git a/python/seldon_deploy_sdk/models/v1_default_protocol.py b/python/seldon_deploy_sdk/models/v1_default_protocol.py new file mode 100644 index 0000000..a62c8d8 --- /dev/null +++ b/python/seldon_deploy_sdk/models/v1_default_protocol.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Seldon Deploy API + + API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 + + OpenAPI spec version: v1alpha1 + Contact: hello@seldon.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1DefaultProtocol(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "PROTOCOL_UNKNOWN" + SELDON = "PROTOCOL_SELDON" + TENSERFLOW = "PROTOCOL_TENSERFLOW" + V2 = "PROTOCOL_V2" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1DefaultProtocol - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1DefaultProtocol, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DefaultProtocol): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/seldon_deploy_sdk/models/v1_model.py b/python/seldon_deploy_sdk/models/v1_model.py index da740fb..010af7d 100644 --- a/python/seldon_deploy_sdk/models/v1_model.py +++ b/python/seldon_deploy_sdk/models/v1_model.py @@ -40,7 +40,8 @@ class V1Model(object): 'metrics': 'dict(str, float)', 'creation_time': 'datetime', 'prediction_schema': 'V1PredictionSchema', - 'project': 'str' + 'project': 'str', + 'runtime_defaults': 'V1RuntimeDefaults' } attribute_map = { @@ -53,10 +54,11 @@ class V1Model(object): 'metrics': 'metrics', 'creation_time': 'creationTime', 'prediction_schema': 'predictionSchema', - 'project': 'project' + 'project': 'project', + 'runtime_defaults': 'runtimeDefaults' } - def __init__(self, uri=None, name=None, version='"v0.0.1"', artifact_type=None, task_type=None, tags=None, metrics=None, creation_time=None, prediction_schema=None, project=None): # noqa: E501 + def __init__(self, uri=None, name=None, version='"v0.0.1"', artifact_type=None, task_type=None, tags=None, metrics=None, creation_time=None, prediction_schema=None, project=None, runtime_defaults=None): # noqa: E501 """V1Model - a model defined in Swagger""" # noqa: E501 self._uri = None @@ -69,6 +71,7 @@ def __init__(self, uri=None, name=None, version='"v0.0.1"', artifact_type=None, self._creation_time = None self._prediction_schema = None self._project = None + self._runtime_defaults = None self.discriminator = None self.uri = uri @@ -90,6 +93,8 @@ def __init__(self, uri=None, name=None, version='"v0.0.1"', artifact_type=None, self.prediction_schema = prediction_schema if project is not None: self.project = project + if runtime_defaults is not None: + self.runtime_defaults = runtime_defaults @property def uri(self): @@ -323,6 +328,29 @@ def project(self, project): self._project = project + @property + def runtime_defaults(self): + """Gets the runtime_defaults of this V1Model. # noqa: E501 + + Default values used when deploying this model. # noqa: E501 + + :return: The runtime_defaults of this V1Model. # noqa: E501 + :rtype: V1RuntimeDefaults + """ + return self._runtime_defaults + + @runtime_defaults.setter + def runtime_defaults(self, runtime_defaults): + """Sets the runtime_defaults of this V1Model. + + Default values used when deploying this model. # noqa: E501 + + :param runtime_defaults: The runtime_defaults of this V1Model. # noqa: E501 + :type: V1RuntimeDefaults + """ + + self._runtime_defaults = runtime_defaults + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/python/seldon_deploy_sdk/models/v1_reset_user_password_response.py b/python/seldon_deploy_sdk/models/v1_reset_user_password_response.py new file mode 100644 index 0000000..9f24baa --- /dev/null +++ b/python/seldon_deploy_sdk/models/v1_reset_user_password_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Seldon Deploy API + + API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 + + OpenAPI spec version: v1alpha1 + Contact: hello@seldon.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1ResetUserPasswordResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1ResetUserPasswordResponse - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1ResetUserPasswordResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1ResetUserPasswordResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/seldon_deploy_sdk/models/v1_runtime_defaults.py b/python/seldon_deploy_sdk/models/v1_runtime_defaults.py new file mode 100644 index 0000000..56cf1b9 --- /dev/null +++ b/python/seldon_deploy_sdk/models/v1_runtime_defaults.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Seldon Deploy API + + API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 + + OpenAPI spec version: v1alpha1 + Contact: hello@seldon.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1RuntimeDefaults(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'default_protocol': 'V1DefaultProtocol' + } + + attribute_map = { + 'default_protocol': 'defaultProtocol' + } + + def __init__(self, default_protocol=None): # noqa: E501 + """V1RuntimeDefaults - a model defined in Swagger""" # noqa: E501 + + self._default_protocol = None + self.discriminator = None + + if default_protocol is not None: + self.default_protocol = default_protocol + + @property + def default_protocol(self): + """Gets the default_protocol of this V1RuntimeDefaults. # noqa: E501 + + The default protocol used for REST/gRPC requests to the model. It is possible that a model can be used with multiple protocols. # noqa: E501 + + :return: The default_protocol of this V1RuntimeDefaults. # noqa: E501 + :rtype: V1DefaultProtocol + """ + return self._default_protocol + + @default_protocol.setter + def default_protocol(self, default_protocol): + """Sets the default_protocol of this V1RuntimeDefaults. + + The default protocol used for REST/gRPC requests to the model. It is possible that a model can be used with multiple protocols. # noqa: E501 + + :param default_protocol: The default_protocol of this V1RuntimeDefaults. # noqa: E501 + :type: V1DefaultProtocol + """ + + self._default_protocol = default_protocol + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1RuntimeDefaults, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1RuntimeDefaults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/python/seldon_deploy_sdk/models/v1_runtime_metadata.py b/python/seldon_deploy_sdk/models/v1_runtime_metadata.py index 703aebd..40ef304 100644 --- a/python/seldon_deploy_sdk/models/v1_runtime_metadata.py +++ b/python/seldon_deploy_sdk/models/v1_runtime_metadata.py @@ -42,7 +42,8 @@ class V1RuntimeMetadata(object): 'traffic': 'str', 'shadow': 'bool', 'creation_time': 'datetime', - 'model': 'V1Model' + 'model': 'V1Model', + 'explainer': 'bool' } attribute_map = { @@ -57,10 +58,11 @@ class V1RuntimeMetadata(object): 'traffic': 'traffic', 'shadow': 'shadow', 'creation_time': 'creationTime', - 'model': 'model' + 'model': 'model', + 'explainer': 'explainer' } - def __init__(self, model_uri=None, deployment_name=None, deployment_namespace=None, deployment_kubernetes_uid=None, predictor_name=None, node_name=None, deployment_status=None, deployment_type=None, traffic=None, shadow=None, creation_time=None, model=None): # noqa: E501 + def __init__(self, model_uri=None, deployment_name=None, deployment_namespace=None, deployment_kubernetes_uid=None, predictor_name=None, node_name=None, deployment_status=None, deployment_type=None, traffic=None, shadow=None, creation_time=None, model=None, explainer=None): # noqa: E501 """V1RuntimeMetadata - a model defined in Swagger""" # noqa: E501 self._model_uri = None @@ -75,6 +77,7 @@ def __init__(self, model_uri=None, deployment_name=None, deployment_namespace=No self._shadow = None self._creation_time = None self._model = None + self._explainer = None self.discriminator = None if model_uri is not None: @@ -101,6 +104,8 @@ def __init__(self, model_uri=None, deployment_name=None, deployment_namespace=No self.creation_time = creation_time if model is not None: self.model = model + if explainer is not None: + self.explainer = explainer @property def model_uri(self): @@ -378,6 +383,29 @@ def model(self, model): self._model = model + @property + def explainer(self): + """Gets the explainer of this V1RuntimeMetadata. # noqa: E501 + + True if this model is a explainer in the deployment. # noqa: E501 + + :return: The explainer of this V1RuntimeMetadata. # noqa: E501 + :rtype: bool + """ + return self._explainer + + @explainer.setter + def explainer(self, explainer): + """Sets the explainer of this V1RuntimeMetadata. + + True if this model is a explainer in the deployment. # noqa: E501 + + :param explainer: The explainer of this V1RuntimeMetadata. # noqa: E501 + :type: bool + """ + + self._explainer = explainer + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/python/setup.py b/python/setup.py index 3af088c..cbfd443 100644 --- a/python/setup.py +++ b/python/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "seldon-deploy-sdk" -VERSION = "1.5.0" +VERSION = "1.6.0" # To install the library, run the following # # python setup.py install diff --git a/python/test/test_permission_management_service_api.py b/python/test/test_permission_management_service_api.py index 59c96b6..aa6f6fd 100644 --- a/python/test/test_permission_management_service_api.py +++ b/python/test/test_permission_management_service_api.py @@ -127,6 +127,13 @@ def test_permission_management_service_get_users(self): """ pass + def test_permission_management_service_reset_user_password(self): + """Test case for permission_management_service_reset_user_password + + Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. # noqa: E501 + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/python/test/test_analytics_props.py b/python/test/test_v1_default_protocol.py similarity index 65% rename from python/test/test_analytics_props.py rename to python/test/test_v1_default_protocol.py index 96cc419..173e7f0 100644 --- a/python/test/test_analytics_props.py +++ b/python/test/test_v1_default_protocol.py @@ -16,12 +16,12 @@ import unittest import seldon_deploy_sdk -from seldon_deploy_sdk.models.analytics_props import AnalyticsProps # noqa: E501 +from seldon_deploy_sdk.models.v1_default_protocol import V1DefaultProtocol # noqa: E501 from seldon_deploy_sdk.rest import ApiException -class TestAnalyticsProps(unittest.TestCase): - """AnalyticsProps unit test stubs""" +class TestV1DefaultProtocol(unittest.TestCase): + """V1DefaultProtocol unit test stubs""" def setUp(self): pass @@ -29,10 +29,10 @@ def setUp(self): def tearDown(self): pass - def testAnalyticsProps(self): - """Test AnalyticsProps""" + def testV1DefaultProtocol(self): + """Test V1DefaultProtocol""" # FIXME: construct object with mandatory attributes with example values - # model = seldon_deploy_sdk.models.analytics_props.AnalyticsProps() # noqa: E501 + # model = seldon_deploy_sdk.models.v1_default_protocol.V1DefaultProtocol() # noqa: E501 pass diff --git a/python/test/test_v1_reset_user_password_response.py b/python/test/test_v1_reset_user_password_response.py new file mode 100644 index 0000000..b1e8a45 --- /dev/null +++ b/python/test/test_v1_reset_user_password_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Seldon Deploy API + + API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 + + OpenAPI spec version: v1alpha1 + Contact: hello@seldon.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import seldon_deploy_sdk +from seldon_deploy_sdk.models.v1_reset_user_password_response import V1ResetUserPasswordResponse # noqa: E501 +from seldon_deploy_sdk.rest import ApiException + + +class TestV1ResetUserPasswordResponse(unittest.TestCase): + """V1ResetUserPasswordResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1ResetUserPasswordResponse(self): + """Test V1ResetUserPasswordResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = seldon_deploy_sdk.models.v1_reset_user_password_response.V1ResetUserPasswordResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_v1_runtime_defaults.py b/python/test/test_v1_runtime_defaults.py new file mode 100644 index 0000000..ed1a4b9 --- /dev/null +++ b/python/test/test_v1_runtime_defaults.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Seldon Deploy API + + API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 + + OpenAPI spec version: v1alpha1 + Contact: hello@seldon.io + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import seldon_deploy_sdk +from seldon_deploy_sdk.models.v1_runtime_defaults import V1RuntimeDefaults # noqa: E501 +from seldon_deploy_sdk.rest import ApiException + + +class TestV1RuntimeDefaults(unittest.TestCase): + """V1RuntimeDefaults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1RuntimeDefaults(self): + """Test V1RuntimeDefaults""" + # FIXME: construct object with mandatory attributes with example values + # model = seldon_deploy_sdk.models.v1_runtime_defaults.V1RuntimeDefaults() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/swagger-v1alpha1.yml b/swagger-v1alpha1.yml index 419114b..c09cba3 100644 --- a/swagger-v1alpha1.yml +++ b/swagger-v1alpha1.yml @@ -114,25 +114,6 @@ definitions: type: object AlibiExplainerType: type: string - AnalyticsProps: - properties: - BuildTime: - type: string - BuildVersion: - type: string - GitBranch: - type: string - GitCommit: - type: string - GitStatus: - type: string - ReleaseType: - type: string - distinct_id: - type: string - token: - type: string - type: object ApplicationLog: description: |- ApplicationLog represents the message and timestamp of a single @@ -246,6 +227,8 @@ definitions: properties: drift_batch_size: type: string + drift_type_feature: + type: boolean env_secret_ref: type: string storage_uri: @@ -313,7 +296,6 @@ definitions: $ref: '#/definitions/NodePhase' workflowUID: $ref: '#/definitions/UID' - title: 'TODO: This is argo specific. Consider making this more generic?' type: object BatchJobDescriptionList: description: BatchJobDescriptionList is a list of BatchJobDescription @@ -6644,6 +6626,7 @@ definitions: - PYTORCH - ONNX - TENSORRT + - ALIBI_EXPLAIN default: UNKNOWN v1DataType: type: string @@ -6654,6 +6637,14 @@ definitions: - STRING - BYTES default: FLOAT + v1DefaultProtocol: + type: string + enum: + - PROTOCOL_UNKNOWN + - PROTOCOL_SELDON + - PROTOCOL_TENSERFLOW + - PROTOCOL_V2 + default: PROTOCOL_UNKNOWN v1DeploymentStatus: type: string enum: @@ -6797,6 +6788,9 @@ definitions: type: string example: project_1 description: The project that this model belongs to. + runtimeDefaults: + $ref: '#/definitions/v1RuntimeDefaults' + description: Default values used when deploying this model. required: - URI v1ModelMetadataCreateResponse: @@ -6835,6 +6829,13 @@ definitions: required: - requests - responses + v1RuntimeDefaults: + type: object + properties: + defaultProtocol: + $ref: '#/definitions/v1DefaultProtocol' + example: V2 + description: The default protocol used for REST/gRPC requests to the model. It is possible that a model can be used with multiple protocols. v1RuntimeMetadata: type: object properties: @@ -6883,6 +6884,9 @@ definitions: model: $ref: '#/definitions/v1Model' description: Detailed metadata of the model referenced in this runtime metadata entry. + explainer: + type: boolean + description: True if this model is a explainer in the deployment. v1RuntimeMetadataListResponse: type: object properties: @@ -7010,6 +7014,8 @@ definitions: type: array items: $ref: '#/definitions/v1GroupPolicy' + v1ResetUserPasswordResponse: + type: object v1ResourceActionPair: type: object properties: @@ -8003,6 +8009,8 @@ paths: $ref: '#/responses/SeldonDeploymentListResponse' "400": $ref: '#/responses/ErrorDefault' + "404": + $ref: '#/responses/ErrorDefault' "405": $ref: '#/responses/ErrorDefault' "424": @@ -9049,6 +9057,7 @@ paths: - PYTORCH - ONNX - TENSORRT + - ALIBI_EXPLAIN default: UNKNOWN - name: taskType in: query @@ -9092,6 +9101,16 @@ paths: in: query required: false type: string + - name: defaultProtocol + in: query + required: false + type: string + enum: + - PROTOCOL_UNKNOWN + - PROTOCOL_SELDON + - PROTOCOL_TENSERFLOW + - PROTOCOL_V2 + default: PROTOCOL_UNKNOWN tags: - ModelMetadataService delete: @@ -9697,6 +9716,33 @@ paths: type: string tags: - PermissionManagementService + /iam/users/{username}/resetPassword: + post: + summary: Endpoint is available only when user management is enabled configured - refer to the docs for how to do this. Sends an email to the user with a link to reset their password. The caller must have `write` permission on `system/iam`. + operationId: PermissionManagementService_ResetUserPassword + responses: + "200": + description: OK + schema: + $ref: '#/definitions/v1ResetUserPasswordResponse' + "400": + description: Bad Request + schema: {} + "403": + description: Forbidden + schema: {} + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: username + description: The username of the user to be deleted. + in: path + required: true + type: string + tags: + - PermissionManagementService /alerting/alerts: get: summary: List currently firing alerts. @@ -9960,10 +10006,6 @@ paths: produces: - application/json responses: - AnalyticsResponse: - description: Analytics - schema: - $ref: '#/definitions/AnalyticsProps' ApplicationLogsResponse: description: Application Logs schema: @@ -10032,10 +10074,6 @@ responses: description: Inference Service schema: $ref: '#/definitions/InferenceService' - LoggerDataResponse: - description: Logger Data - schema: - $ref: '#/definitions/LoggerDataType' MessageResponse: description: GenericMessage Message schema: @@ -10054,12 +10092,6 @@ responses: description: Seldon Deployment schema: $ref: '#/definitions/SeldonDeployment' - URLsResponse: - description: URLs - schema: - additionalProperties: - type: string - type: object UserResponse: description: User schema: