Skip to content

Commit

Permalink
Merge pull request #20 from ivan-valkov/fix-model-metadata-path
Browse files Browse the repository at this point in the history
Use same path pattern for model metadata as with all other APIs
  • Loading branch information
ryandawsonuk authored May 12, 2021
2 parents efb0f3f + 95e7ff6 commit 5e8d92f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 25 deletions.
4 changes: 2 additions & 2 deletions examples/metadata_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
"outputs": [],
"source": [
"# For local testing use\n",
"INGRESS = \"http://localhost:8080\"\n",
"INGRESS = \"http://localhost:8080/seldon-deploy/api/v1alpha1\"\n",
"\n",
"# For production usecase set this to your ingress\n",
"# for example if your SD URL is http://xxx.yyy.zzz.xyz/seldon-deploy set\n",
"# for example if your SD URL is http://xxx.yyy.zzz.xyz/seldon-deploy/api/v1alpha1 set\n",
"# INGRESS = \"http://xxx.yyy.zzz.xyz\""
]
},
Expand Down
10 changes: 5 additions & 5 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ Class | Method | HTTP request | Description
*MetricsServerApi* | [**create_metrics_server_seldon_deployment**](docs/MetricsServerApi.md#create_metrics_server_seldon_deployment) | **POST** /namespaces/{namespace}/seldondeployments/{name}/metricsserver |
*MetricsServerApi* | [**delete_metrics_server_seldon_deployment**](docs/MetricsServerApi.md#delete_metrics_server_seldon_deployment) | **DELETE** /namespaces/{namespace}/seldondeployments/{name}/metricsserver |
*MetricsServerApi* | [**read_metrics_server_seldon_deployment**](docs/MetricsServerApi.md#read_metrics_server_seldon_deployment) | **GET** /namespaces/{namespace}/seldondeployments/{name}/metricsserver |
*ModelMetadataServiceApi* | [**model_metadata_service_create_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_create_model_metadata) | **POST** /seldon-deploy/api/v1alpha1/model/metadata | Create a Model Metadata entry.
*ModelMetadataServiceApi* | [**model_metadata_service_delete_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_delete_model_metadata) | **DELETE** /seldon-deploy/api/v1alpha1/model/metadata | Delete a Model Metadata entry.
*ModelMetadataServiceApi* | [**model_metadata_service_list_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_list_model_metadata) | **GET** /seldon-deploy/api/v1alpha1/model/metadata | List Model Metadata entries.
*ModelMetadataServiceApi* | [**model_metadata_service_list_runtime_metadata_for_model**](docs/ModelMetadataServiceApi.md#model_metadata_service_list_runtime_metadata_for_model) | **GET** /seldon-deploy/api/v1alpha1/model/metadata/runtime | List Runtime Metadata for all deployments associated with a model.
*ModelMetadataServiceApi* | [**model_metadata_service_update_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_update_model_metadata) | **PUT** /seldon-deploy/api/v1alpha1/model/metadata | Update a Model Metadata entry.
*ModelMetadataServiceApi* | [**model_metadata_service_create_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_create_model_metadata) | **POST** /model/metadata | Create a Model Metadata entry.
*ModelMetadataServiceApi* | [**model_metadata_service_delete_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_delete_model_metadata) | **DELETE** /model/metadata | Delete a Model Metadata entry.
*ModelMetadataServiceApi* | [**model_metadata_service_list_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_list_model_metadata) | **GET** /model/metadata | List Model Metadata entries.
*ModelMetadataServiceApi* | [**model_metadata_service_list_runtime_metadata_for_model**](docs/ModelMetadataServiceApi.md#model_metadata_service_list_runtime_metadata_for_model) | **GET** /model/metadata/runtime | List Runtime Metadata for all deployments associated with a model.
*ModelMetadataServiceApi* | [**model_metadata_service_update_model_metadata**](docs/ModelMetadataServiceApi.md#model_metadata_service_update_model_metadata) | **PUT** /model/metadata | Update a Model Metadata entry.
*OutlierDetectorApi* | [**create_outlier_detector_inference_service**](docs/OutlierDetectorApi.md#create_outlier_detector_inference_service) | **POST** /namespaces/{namespace}/inferenceservices/{name}/outlierdetector |
*OutlierDetectorApi* | [**create_outlier_detector_seldon_deployment**](docs/OutlierDetectorApi.md#create_outlier_detector_seldon_deployment) | **POST** /namespaces/{namespace}/seldondeployments/{name}/outlierdetector |
*OutlierDetectorApi* | [**delete_outlier_detector_inference_service**](docs/OutlierDetectorApi.md#delete_outlier_detector_inference_service) | **DELETE** /namespaces/{namespace}/inferenceservice/{name}/outlierdetector |
Expand Down
16 changes: 6 additions & 10 deletions python/docs/ModelMetadataServiceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ All URIs are relative to *https://X.X.X.X/seldon-deploy/api/v1alpha1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**model_metadata_service_create_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_create_model_metadata) | **POST** /seldon-deploy/api/v1alpha1/model/metadata | Create a Model Metadata entry.
[**model_metadata_service_delete_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_delete_model_metadata) | **DELETE** /seldon-deploy/api/v1alpha1/model/metadata | Delete a Model Metadata entry.
[**model_metadata_service_list_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_list_model_metadata) | **GET** /seldon-deploy/api/v1alpha1/model/metadata | List Model Metadata entries.
[**model_metadata_service_list_runtime_metadata_for_model**](ModelMetadataServiceApi.md#model_metadata_service_list_runtime_metadata_for_model) | **GET** /seldon-deploy/api/v1alpha1/model/metadata/runtime | List Runtime Metadata for all deployments associated with a model.
[**model_metadata_service_update_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_update_model_metadata) | **PUT** /seldon-deploy/api/v1alpha1/model/metadata | Update a Model Metadata entry.
[**model_metadata_service_create_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_create_model_metadata) | **POST** /model/metadata | Create a Model Metadata entry.
[**model_metadata_service_delete_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_delete_model_metadata) | **DELETE** /model/metadata | Delete a Model Metadata entry.
[**model_metadata_service_list_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_list_model_metadata) | **GET** /model/metadata | List Model Metadata entries.
[**model_metadata_service_list_runtime_metadata_for_model**](ModelMetadataServiceApi.md#model_metadata_service_list_runtime_metadata_for_model) | **GET** /model/metadata/runtime | List Runtime Metadata for all deployments associated with a model.
[**model_metadata_service_update_model_metadata**](ModelMetadataServiceApi.md#model_metadata_service_update_model_metadata) | **PUT** /model/metadata | Update a Model Metadata entry.


# **model_metadata_service_create_model_metadata**
Expand Down Expand Up @@ -138,15 +138,13 @@ version = 'version_example' # str | (optional)
artifact_type = 'UNKNOWN' # str | (optional) (default to UNKNOWN)
task_type = 'task_type_example' # str | (optional)
model_type = 'model_type_example' # str | (optional)
tags = {"tag_key_example": "tag_value_example"} # dict (optional)
metrics = {"metric_key_example": 123} # dict (optional)
page_size = 56 # int | Optional. The maximum number of Folders to return in the response. (optional)
page_token = 'page_token_example' # str | Optional. A pagination token returned from a previous call to `List` that indicates where this listing should continue from. (optional)
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)

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, page_size=page_size, page_token=page_token, list_mask=list_mask)
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, page_size=page_size, page_token=page_token, list_mask=list_mask)
pprint(api_response)
except ApiException as e:
print("Exception when calling ModelMetadataServiceApi->model_metadata_service_list_model_metadata: %s\n" % e)
Expand All @@ -162,8 +160,6 @@ Name | Type | Description | Notes
**artifact_type** | **str**| | [optional] [default to UNKNOWN]
**task_type** | **str**| | [optional]
**model_type** | **str**| | [optional]
**tags** | **dict**| | [optional]
**metrics** | **dict**| | [optional]
**page_size** | **int**| Optional. The maximum number of Folders to return in the response. | [optional]
**page_token** | **str**| Optional. A pagination token returned from a previous call to `List` that indicates where this listing should continue from. | [optional]
**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]
Expand Down
10 changes: 5 additions & 5 deletions python/seldon_deploy_sdk/api/model_metadata_service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def model_metadata_service_create_model_metadata_with_http_info(self, body, **kw
auth_settings = ['OAuth2'] # noqa: E501

return self.api_client.call_api(
'/seldon-deploy/api/v1alpha1/model/metadata', 'POST',
'/model/metadata', 'POST',
path_params,
query_params,
header_params,
Expand Down Expand Up @@ -212,7 +212,7 @@ def model_metadata_service_delete_model_metadata_with_http_info(self, uri, **kwa
auth_settings = ['OAuth2'] # noqa: E501

return self.api_client.call_api(
'/seldon-deploy/api/v1alpha1/model/metadata', 'DELETE',
'/model/metadata', 'DELETE',
path_params,
query_params,
header_params,
Expand Down Expand Up @@ -349,7 +349,7 @@ def model_metadata_service_list_model_metadata_with_http_info(self, **kwargs):
auth_settings = ['OAuth2'] # noqa: E501

return self.api_client.call_api(
'/seldon-deploy/api/v1alpha1/model/metadata', 'GET',
'/model/metadata', 'GET',
path_params,
query_params,
header_params,
Expand Down Expand Up @@ -478,7 +478,7 @@ def model_metadata_service_list_runtime_metadata_for_model_with_http_info(self,
auth_settings = ['OAuth2'] # noqa: E501

return self.api_client.call_api(
'/seldon-deploy/api/v1alpha1/model/metadata/runtime', 'GET',
'/model/metadata/runtime', 'GET',
path_params,
query_params,
header_params,
Expand Down Expand Up @@ -575,7 +575,7 @@ def model_metadata_service_update_model_metadata_with_http_info(self, body, **kw
auth_settings = ['OAuth2'] # noqa: E501

return self.api_client.call_api(
'/seldon-deploy/api/v1alpha1/model/metadata', 'PUT',
'/model/metadata', 'PUT',
path_params,
query_params,
header_params,
Expand Down
2 changes: 1 addition & 1 deletion python/seldon_deploy_sdk/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,4 @@ def to_debug_report(self):
"Python Version: {pyversion}\n"\
"Version of the API: v1alpha1\n"\
"SDK Package Version: 1.2.0".\
format(env=sys.platform, pyversion=sys.version)
format(env=sys.platform, pyversion=sys.version)
4 changes: 2 additions & 2 deletions swagger-v1alpha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9256,7 +9256,7 @@ paths:
$ref: '#/responses/VersionResponse'
tags:
- Environment
/seldon-deploy/api/v1alpha1/model/metadata:
/model/metadata:
get:
summary: List Model Metadata entries.
description: 'List takes several parameters that are present in the Model Metadata and tries to list all metadata entries that match all supplied fields. To filter by `tags` or `metrics` you can use a map as a query parameter. For example: `?tags[key]=value`.'
Expand Down Expand Up @@ -9415,7 +9415,7 @@ paths:
$ref: '#/definitions/v1Model'
tags:
- ModelMetadataService
/seldon-deploy/api/v1alpha1/model/metadata/runtime:
/model/metadata/runtime:
get:
summary: List Runtime Metadata for all deployments associated with a model.
operationId: ModelMetadataService_ListRuntimeMetadataForModel
Expand Down

0 comments on commit 5e8d92f

Please sign in to comment.