From adf86ac4ea678e9a55c9b6ddbbd32a8c4c7a14f4 Mon Sep 17 00:00:00 2001 From: David Olaru Date: Mon, 6 Nov 2023 16:09:46 +0000 Subject: [PATCH] Update `deployment_id` in ML trained model deployment start request (#2325) This adds the missing `deployment_id` query parameter to the `_start` request, that was introduced in v8.8.0. [Docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/start-trained-model-deployment.html#start-trained-model-deployment-query-params) say: > deployment_id > (Optional, string) A unique identifier for the deployment of the model. (cherry picked from commit e627f16513059e05937ce6825c1d582bcc23635f) --- output/schema/schema.json | 20 ++++++++++++++++++- output/schema/validation-errors.json | 6 ------ output/typescript/types.ts | 1 + .../MlStartTrainedModelDeploymentRequest.ts | 5 +++++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 5a68455ed4..654b5808ee 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -145882,6 +145882,24 @@ } } }, + { + "availability": { + "stack": { + "since": "8.8.0" + } + }, + "description": "A unique identifier for the deployment of the model.", + "name": "deployment_id", + "required": false, + "since": "8.8.0", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "The number of model allocations on each node where the model is deployed.\nAll allocations on a node share the same copy of the model in memory but use\na separate set of threads to evaluate the model.\nIncreasing this value generally increases the throughput.\nIf this setting is greater than the number of hardware threads\nit will automatically be changed to a value less than the number of hardware threads.", "name": "number_of_allocations", @@ -145960,7 +145978,7 @@ } } ], - "specLocation": "ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L87" + "specLocation": "ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L92" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 0e66c08b43..37e16daea4 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1039,12 +1039,6 @@ "response definition ml.set_upgrade_mode:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" ] }, - "ml.start_trained_model_deployment": { - "request": [ - "Request: missing json spec query parameter 'deployment_id'" - ], - "response": [] - }, "ml.stop_datafeed": { "request": [ "Request: missing json spec query parameter 'allow_no_datafeeds'" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 394577c707..82f3a65faf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14253,6 +14253,7 @@ export interface MlStartDatafeedResponse { export interface MlStartTrainedModelDeploymentRequest extends RequestBase { model_id: Id cache_size?: ByteSize + deployment_id?: string number_of_allocations?: integer priority?: MlTrainingPriority queue_capacity?: integer diff --git a/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts b/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts index b55fef9cb7..936c42ddf2 100644 --- a/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts +++ b/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts @@ -47,6 +47,11 @@ export interface Request extends RequestBase { * `0b` can be provided. */ cache_size?: ByteSize + /** + * A unique identifier for the deployment of the model. + * @availability stack since=8.8.0 + */ + deployment_id?: string /** * The number of model allocations on each node where the model is deployed. * All allocations on a node share the same copy of the model in memory but use