From 57d29e78f539fa9f3142aae7ace1b17a30c3e52b 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 7c2814f338..4c37dd202e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -154194,6 +154194,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", @@ -154272,7 +154290,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 d030b5d4ca..9b68d47a7c 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1035,12 +1035,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 aab0406d8a..63c100d5da 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14355,6 +14355,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 1b5e9803c6..c1fa2bba77 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