From 13c493d49949ff591d6c99d81aedd615f8f27300 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:06:45 +0000 Subject: [PATCH] Update `deployment_id` in ML trained model deployment start request (#2325) (#2334) 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: --- 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 932599a7ea..c81acb61a3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -150795,6 +150795,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", @@ -150873,7 +150891,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 0704b1234d..0ff0708be6 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1036,12 +1036,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 0e55becac5..4727dc71ee 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14281,6 +14281,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