diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 880f757cfb..2c06fe2282 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -23404,7 +23404,7 @@ { "in": "query", "name": "number_of_allocations", - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "deprecated": false, "schema": { "type": "number" @@ -23462,6 +23462,20 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adaptive_allocations": { + "$ref": "#/components/schemas/ml._types:AdaptiveAllocationsSettings" + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -24435,8 +24449,11 @@ "type": "object", "properties": { "number_of_allocations": { - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "type": "number" + }, + "adaptive_allocations": { + "$ref": "#/components/schemas/ml._types:AdaptiveAllocationsSettings" } } } @@ -81101,12 +81118,15 @@ "type": "object", "properties": { "enabled": { + "description": "If true, adaptive_allocations is enabled", "type": "boolean" }, "min_number_of_allocations": { + "description": "Specifies the minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", "type": "number" }, "max_number_of_allocations": { + "description": "Specifies the maximum number of allocations to scale to.\nIf set, it must be greater than or equal to min_number_of_allocations.", "type": "number" } }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 39ea2655ab..0b8e9be740 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -13155,7 +13155,7 @@ { "in": "query", "name": "number_of_allocations", - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "deprecated": false, "schema": { "type": "number" @@ -13213,6 +13213,20 @@ "style": "form" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "adaptive_allocations": { + "$ref": "#/components/schemas/ml._types:AdaptiveAllocationsSettings" + } + } + } + } + } + }, "responses": { "200": { "description": "", @@ -14107,8 +14121,11 @@ "type": "object", "properties": { "number_of_allocations": { - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "type": "number" + }, + "adaptive_allocations": { + "$ref": "#/components/schemas/ml._types:AdaptiveAllocationsSettings" } } } @@ -52116,12 +52133,15 @@ "type": "object", "properties": { "enabled": { + "description": "If true, adaptive_allocations is enabled", "type": "boolean" }, "min_number_of_allocations": { + "description": "Specifies the minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", "type": "number" }, "max_number_of_allocations": { + "description": "Specifies the maximum number of allocations to scale to.\nIf set, it must be greater than or equal to min_number_of_allocations.", "type": "number" } }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 3e70d18b13..2f5ef9b66b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -156594,6 +156594,7 @@ }, "properties": [ { + "description": "If true, adaptive_allocations is enabled", "name": "enabled", "required": true, "type": { @@ -156605,6 +156606,7 @@ } }, { + "description": "Specifies the minimum number of allocations to scale to.\nIf set, it must be greater than or equal to 0.\nIf not defined, the deployment scales to 0.", "name": "min_number_of_allocations", "required": false, "type": { @@ -156616,6 +156618,7 @@ } }, { + "description": "Specifies the maximum number of allocations to scale to.\nIf set, it must be greater than or equal to min_number_of_allocations.", "name": "max_number_of_allocations", "required": false, "type": { @@ -156627,7 +156630,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L109-L113" + "specLocation": "ml/_types/TrainedModel.ts#L109-L125" }, { "kind": "interface", @@ -161975,7 +161978,7 @@ "name": "DeploymentAllocationState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L318-L331" + "specLocation": "ml/_types/TrainedModel.ts#L330-L343" }, { "kind": "enum", @@ -162001,7 +162004,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L333-L350" + "specLocation": "ml/_types/TrainedModel.ts#L345-L362" }, { "kind": "interface", @@ -163046,7 +163049,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L261-L275" + "specLocation": "ml/_types/TrainedModel.ts#L273-L287" }, { "kind": "interface", @@ -165125,7 +165128,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L244-L259" + "specLocation": "ml/_types/TrainedModel.ts#L256-L271" }, { "kind": "interface", @@ -166418,7 +166421,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L395-L416" + "specLocation": "ml/_types/TrainedModel.ts#L407-L428" }, { "kind": "enum", @@ -167113,7 +167116,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L277-L284" + "specLocation": "ml/_types/TrainedModel.ts#L289-L296" }, { "kind": "interface", @@ -167150,7 +167153,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L286-L291" + "specLocation": "ml/_types/TrainedModel.ts#L298-L303" }, { "kind": "interface", @@ -167196,7 +167199,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L293-L300" + "specLocation": "ml/_types/TrainedModel.ts#L305-L312" }, { "kind": "interface", @@ -167309,7 +167312,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L447-L464" + "specLocation": "ml/_types/TrainedModel.ts#L459-L476" }, { "kind": "interface", @@ -167367,7 +167370,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L418-L436" + "specLocation": "ml/_types/TrainedModel.ts#L430-L448" }, { "kind": "interface", @@ -167500,7 +167503,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L357-L393" + "specLocation": "ml/_types/TrainedModel.ts#L369-L405" }, { "kind": "interface", @@ -167759,7 +167762,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L191-L227" + "specLocation": "ml/_types/TrainedModel.ts#L203-L239" }, { "kind": "interface", @@ -167784,7 +167787,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L229-L232" + "specLocation": "ml/_types/TrainedModel.ts#L241-L244" }, { "kind": "interface", @@ -167861,7 +167864,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L234-L242" + "specLocation": "ml/_types/TrainedModel.ts#L246-L254" }, { "kind": "interface", @@ -167907,7 +167910,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L438-L445" + "specLocation": "ml/_types/TrainedModel.ts#L450-L457" }, { "kind": "interface", @@ -168176,7 +168179,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L144-L189" + "specLocation": "ml/_types/TrainedModel.ts#L156-L201" }, { "kind": "interface", @@ -168634,7 +168637,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L115-L135" + "specLocation": "ml/_types/TrainedModel.ts#L127-L147" }, { "kind": "interface", @@ -168655,7 +168658,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L466-L468" + "specLocation": "ml/_types/TrainedModel.ts#L478-L480" }, { "kind": "interface", @@ -168676,7 +168679,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L470-L472" + "specLocation": "ml/_types/TrainedModel.ts#L482-L484" }, { "kind": "interface", @@ -168710,7 +168713,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L474-L483" + "specLocation": "ml/_types/TrainedModel.ts#L486-L495" }, { "kind": "interface", @@ -168744,7 +168747,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L137-L142" + "specLocation": "ml/_types/TrainedModel.ts#L149-L154" }, { "kind": "interface", @@ -168857,7 +168860,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L302-L316" + "specLocation": "ml/_types/TrainedModel.ts#L314-L328" }, { "kind": "enum", @@ -168873,7 +168876,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L352-L355" + "specLocation": "ml/_types/TrainedModel.ts#L364-L367" }, { "kind": "interface", @@ -179571,7 +179574,21 @@ "CommonQueryParameters" ], "body": { - "kind": "no_body" + "kind": "properties", + "properties": [ + { + "description": "Adaptive allocations configuration. When enabled, the number of allocations\nis set based on the current load.\nIf adaptive_allocations is enabled, do not set the number of allocations manually.", + "name": "adaptive_allocations", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AdaptiveAllocationsSettings", + "namespace": "ml._types" + } + } + } + ] }, "description": "Start a trained model deployment.\nIt allocates the model to every machine learning node.", "inherits": { @@ -179629,7 +179646,7 @@ } }, { - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "name": "number_of_allocations", "required": false, "serverDefault": 1, @@ -179706,7 +179723,7 @@ } } ], - "specLocation": "ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L29-L101" + "specLocation": "ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L111" }, { "kind": "response", @@ -181545,7 +181562,7 @@ "kind": "properties", "properties": [ { - "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.", + "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.\nIf adaptive_allocations is enabled, do not set this value, because it’s automatically set.", "name": "number_of_allocations", "required": false, "serverDefault": 1, @@ -181556,6 +181573,18 @@ "namespace": "_types" } } + }, + { + "description": "Adaptive allocations configuration. When enabled, the number of allocations\nis set based on the current load.\nIf adaptive_allocations is enabled, do not set the number of allocations manually.", + "name": "adaptive_allocations", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AdaptiveAllocationsSettings", + "namespace": "ml._types" + } + } } ] }, @@ -181599,7 +181628,7 @@ } } ], - "specLocation": "ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L24-L70" + "specLocation": "ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L78" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 56cb763f8b..9e3f87ebbf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -16523,6 +16523,9 @@ export interface MlStartTrainedModelDeploymentRequest extends RequestBase { threads_per_allocation?: integer timeout?: Duration wait_for?: MlDeploymentAllocationState + body?: { + adaptive_allocations?: MlAdaptiveAllocationsSettings + } } export interface MlStartTrainedModelDeploymentResponse { @@ -16712,6 +16715,7 @@ export interface MlUpdateTrainedModelDeploymentRequest extends RequestBase { number_of_allocations?: integer body?: { number_of_allocations?: integer + adaptive_allocations?: MlAdaptiveAllocationsSettings } } diff --git a/specification/_json_spec/ml.start_trained_model_deployment.json b/specification/_json_spec/ml.start_trained_model_deployment.json index 8588362cbe..d4fc693862 100644 --- a/specification/_json_spec/ml.start_trained_model_deployment.json +++ b/specification/_json_spec/ml.start_trained_model_deployment.json @@ -73,6 +73,10 @@ "options": ["starting", "started", "fully_allocated"], "default": "started" } + }, + "body": { + "description": "The settings for the trained model deployment", + "required": false } } } diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index d21c37e678..9374dd09b0 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -107,8 +107,20 @@ export class TrainedModelDeploymentStats { } export class AdaptiveAllocationsSettings { + /** + * If true, adaptive_allocations is enabled + */ enabled: boolean + /** + * Specifies the minimum number of allocations to scale to. + * If set, it must be greater than or equal to 0. + * If not defined, the deployment scales to 0. + */ min_number_of_allocations?: integer + /** + * Specifies the maximum number of allocations to scale to. + * If set, it must be greater than or equal to min_number_of_allocations. + */ max_number_of_allocations?: integer } diff --git a/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts b/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts index 73ee5a16de..0ecb580896 100644 --- a/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts +++ b/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts @@ -22,6 +22,7 @@ import { ByteSize, Id } from '@_types/common' import { integer } from '@_types/Numeric' import { Duration } from '@_types/Time' import { + AdaptiveAllocationsSettings, DeploymentAllocationState, TrainingPriority } from '../_types/TrainedModel' @@ -68,6 +69,7 @@ export interface Request extends RequestBase { * Increasing this value generally increases the throughput. * If this setting is greater than the number of hardware threads * it will automatically be changed to a value less than the number of hardware threads. + * If adaptive_allocations is enabled, do not set this value, because it’s automatically set. * @server_default 1 */ number_of_allocations?: integer @@ -98,4 +100,12 @@ export interface Request extends RequestBase { */ wait_for?: DeploymentAllocationState } + body: { + /** + * Adaptive allocations configuration. When enabled, the number of allocations + * is set based on the current load. + * If adaptive_allocations is enabled, do not set the number of allocations manually. + */ + adaptive_allocations?: AdaptiveAllocationsSettings + } } diff --git a/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts b/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts index e80e4e60b7..db137d1999 100644 --- a/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts +++ b/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts @@ -17,6 +17,7 @@ * under the License. */ +import { AdaptiveAllocationsSettings } from '@ml/_types/TrainedModel' import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' import { integer } from '@_types/Numeric' @@ -63,8 +64,15 @@ export interface Request extends RequestBase { * Increasing this value generally increases the throughput. * If this setting is greater than the number of hardware threads * it will automatically be changed to a value less than the number of hardware threads. + * If adaptive_allocations is enabled, do not set this value, because it’s automatically set. * @server_default 1 */ number_of_allocations?: integer + /** + * Adaptive allocations configuration. When enabled, the number of allocations + * is set based on the current load. + * If adaptive_allocations is enabled, do not set the number of allocations manually. + */ + adaptive_allocations?: AdaptiveAllocationsSettings } }