From ec58ee59c377d74d022dccb12f80189e2bf994d4 Mon Sep 17 00:00:00 2001 From: Max Hniebergall Date: Tue, 3 Oct 2023 10:17:37 -0400 Subject: [PATCH 1/2] Added platform_architecture field to MlPutTrainedModelRequest to add support for platform specific models --- .../ml/put_trained_model/MlPutTrainedModelRequest.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts b/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts index 8374b81ccd..4c5b5d0b7d 100644 --- a/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts +++ b/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts @@ -88,6 +88,16 @@ export interface Request extends RequestBase { * or the model definition is not supplied. */ model_size_bytes?: long + /** + * The platform architecture (if applicable) of the trained mode. If the model + * only works on one platform, because it is heavily optimized for a particular + * processor architecture and OS combination, then this field specifies which. + * The format of the string must match the platform identifiers used by Elasticsearch, + * so one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`, + * or `windows-x86_64`. For portable models (those that work independent of processor + * architecture or OS features), leave this field unset. + */ + platform_architecture?: string /** * An array of tags to organize the model. */ From cbe2c96de224a14e007561df31cc61c59d926d6b Mon Sep 17 00:00:00 2001 From: Max Hniebergall Date: Tue, 3 Oct 2023 10:37:35 -0400 Subject: [PATCH 2/2] make generate --- output/schema/schema.json | 14 +++++++++++++- output/typescript/types.ts | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 08181442bc..53404d277c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -153689,6 +153689,18 @@ } } }, + { + "description": "The platform architecture (if applicable) of the trained mode. If the model\nonly works on one platform, because it is heavily optimized for a particular\nprocessor architecture and OS combination, then this field specifies which.\nThe format of the string must match the platform identifiers used by Elasticsearch,\nso one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,\nor `windows-x86_64`. For portable models (those that work independent of processor\narchitecture or OS features), leave this field unset.", + "name": "platform_architecture", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "description": "An array of tags to organize the model.", "name": "tags", @@ -153753,7 +153765,7 @@ } } ], - "specLocation": "ml/put_trained_model/MlPutTrainedModelRequest.ts#L28-L96" + "specLocation": "ml/put_trained_model/MlPutTrainedModelRequest.ts#L28-L106" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 65a485072d..92f674c936 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14236,6 +14236,7 @@ export interface MlPutTrainedModelRequest extends RequestBase { metadata?: any model_type?: MlTrainedModelType model_size_bytes?: long + platform_architecture?: string tags?: string[] } }