From 281171c44eb25a854a385321ea609d9225e615d3 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 6 Dec 2024 17:39:54 +0100 Subject: [PATCH] addressing reviews --- output/openapi/elasticsearch-openapi.json | 28 +++---- .../elasticsearch-serverless-openapi.json | 28 +++---- output/schema/schema-serverless.json | 79 ++++++++----------- output/schema/schema.json | 79 ++++++++----------- output/typescript/types.ts | 17 ++-- specification/ml/_types/TrainedModel.ts | 11 +-- 6 files changed, 98 insertions(+), 144 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 7b0e3e5757..6d4686b2e7 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -76171,9 +76171,6 @@ "search": { "description": "String prepended to input at search", "type": "string" - }, - "none": { - "type": "string" } } }, @@ -76303,14 +76300,12 @@ } }, "required": [ - "allocation_status", "deployment_id", "model_id", "nodes", "peak_throughput_per_minute", "priority", - "start_time", - "state" + "start_time" ] }, "ml._types:AdaptiveAllocationsSettings": { @@ -76386,7 +76381,7 @@ "type": "number" }, "last_access": { - "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "node": { "$ref": "#/components/schemas/ml._types:DiscoveryNode" @@ -76410,7 +76405,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelAssignmentRoutingTable" }, "start_time": { - "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "threads_per_allocation": { "description": "The number of threads used by each allocation during inference.", @@ -76426,14 +76421,8 @@ }, "required": [ "peak_throughput_per_minute", - "routing_state" - ] - }, - "_types:EpochTimeUnitNanos": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:UnitNanos" - } + "routing_state", + "throughput_last_minute" ] }, "ml._types:TrainedModelAssignmentRoutingTable": { @@ -76456,7 +76445,9 @@ } }, "required": [ - "routing_state" + "routing_state", + "current_allocations", + "target_allocations" ] }, "ml._types:RoutingState": { @@ -77534,8 +77525,7 @@ "type": "object", "properties": { "model_bytes": { - "description": "The size of the trained model in bytes.", - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "model_id": { "$ref": "#/components/schemas/_types:Id" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 13cbbaf86d..4a8b03f5f8 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -50969,9 +50969,6 @@ "search": { "description": "String prepended to input at search", "type": "string" - }, - "none": { - "type": "string" } } }, @@ -51101,14 +51098,12 @@ } }, "required": [ - "allocation_status", "deployment_id", "model_id", "nodes", "peak_throughput_per_minute", "priority", - "start_time", - "state" + "start_time" ] }, "ml._types:AdaptiveAllocationsSettings": { @@ -51184,7 +51179,7 @@ "type": "number" }, "last_access": { - "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "number_of_allocations": { "description": "The number of allocations assigned to this node.", @@ -51205,7 +51200,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelAssignmentRoutingTable" }, "start_time": { - "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "threads_per_allocation": { "description": "The number of threads used by each allocation during inference.", @@ -51221,14 +51216,8 @@ }, "required": [ "peak_throughput_per_minute", - "routing_state" - ] - }, - "_types:EpochTimeUnitNanos": { - "allOf": [ - { - "$ref": "#/components/schemas/_types:UnitNanos" - } + "routing_state", + "throughput_last_minute" ] }, "ml._types:TrainedModelAssignmentRoutingTable": { @@ -51251,7 +51240,9 @@ } }, "required": [ - "routing_state" + "routing_state", + "current_allocations", + "target_allocations" ] }, "ml._types:RoutingState": { @@ -52250,8 +52241,7 @@ "type": "object", "properties": { "model_bytes": { - "description": "The size of the trained model in bytes.", - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "model_id": { "$ref": "#/components/schemas/_types:Id" diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index eb4df17883..f14eba344b 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -95124,7 +95124,7 @@ "name": "DeploymentAllocationState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L319-L332" + "specLocation": "ml/_types/TrainedModel.ts#L318-L331" }, { "kind": "enum", @@ -95150,7 +95150,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L334-L351" + "specLocation": "ml/_types/TrainedModel.ts#L333-L350" }, { "kind": "type_alias", @@ -95495,7 +95495,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L396-L417" + "specLocation": "ml/_types/TrainedModel.ts#L395-L416" }, { "kind": "enum", @@ -95576,7 +95576,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L303-L317" + "specLocation": "ml/_types/TrainedModel.ts#L302-L316" }, { "kind": "enum", @@ -95592,7 +95592,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L353-L356" + "specLocation": "ml/_types/TrainedModel.ts#L352-L355" }, { "codegenNames": [ @@ -132739,7 +132739,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L192-L228" + "specLocation": "ml/_types/TrainedModel.ts#L191-L227" }, { "description": "Inference configuration provided when storing the model config", @@ -133699,7 +133699,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L230-L233" + "specLocation": "ml/_types/TrainedModel.ts#L229-L232" }, { "kind": "interface", @@ -133776,7 +133776,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L235-L243" + "specLocation": "ml/_types/TrainedModel.ts#L234-L242" }, { "kind": "interface", @@ -133848,7 +133848,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L262-L276" + "specLocation": "ml/_types/TrainedModel.ts#L261-L275" }, { "kind": "interface", @@ -133900,7 +133900,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L278-L285" + "specLocation": "ml/_types/TrainedModel.ts#L277-L284" }, { "kind": "interface", @@ -133946,7 +133946,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L294-L301" + "specLocation": "ml/_types/TrainedModel.ts#L293-L300" }, { "kind": "interface", @@ -133983,7 +133983,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L287-L292" + "specLocation": "ml/_types/TrainedModel.ts#L286-L291" }, { "kind": "interface", @@ -134166,7 +134166,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L245-L260" + "specLocation": "ml/_types/TrainedModel.ts#L244-L259" }, { "kind": "interface", @@ -134198,20 +134198,9 @@ "namespace": "_builtins" } } - }, - { - "name": "none", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } } ], - "specLocation": "ml/_types/TrainedModel.ts#L475-L486" + "specLocation": "ml/_types/TrainedModel.ts#L474-L483" }, { "kind": "interface", @@ -134232,7 +134221,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L467-L469" + "specLocation": "ml/_types/TrainedModel.ts#L466-L468" }, { "kind": "interface", @@ -134253,7 +134242,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L471-L473" + "specLocation": "ml/_types/TrainedModel.ts#L470-L472" }, { "kind": "interface", @@ -134344,7 +134333,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L43-L61" + "specLocation": "ml/_types/TrainedModel.ts#L42-L60" }, { "kind": "interface", @@ -134367,7 +134356,7 @@ { "description": "The detailed allocation status for the deployment.", "name": "allocation_status", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -134544,7 +134533,7 @@ { "description": "The overall state of the deployment.", "name": "state", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -134578,7 +134567,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L63-L108" + "specLocation": "ml/_types/TrainedModel.ts#L62-L107" }, { "kind": "interface", @@ -134621,7 +134610,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L110-L114" + "specLocation": "ml/_types/TrainedModel.ts#L109-L113" }, { "kind": "interface", @@ -134667,7 +134656,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L439-L446" + "specLocation": "ml/_types/TrainedModel.ts#L438-L445" }, { "kind": "interface", @@ -134793,7 +134782,7 @@ { "kind": "instance_of", "type": { - "name": "UnitNanos", + "name": "UnitMillis", "namespace": "_types" } } @@ -134873,7 +134862,7 @@ { "kind": "instance_of", "type": { - "name": "UnitNanos", + "name": "UnitMillis", "namespace": "_types" } } @@ -134899,7 +134888,7 @@ }, { "name": "throughput_last_minute", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -134921,7 +134910,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L145-L190" + "specLocation": "ml/_types/TrainedModel.ts#L144-L189" }, { "kind": "interface", @@ -134957,7 +134946,7 @@ { "description": "Current number of allocations.", "name": "current_allocations", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -134969,7 +134958,7 @@ { "description": "Target number of allocations.", "name": "target_allocations", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -134979,7 +134968,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L419-L437" + "specLocation": "ml/_types/TrainedModel.ts#L418-L436" }, { "kind": "interface", @@ -135060,7 +135049,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L116-L136" + "specLocation": "ml/_types/TrainedModel.ts#L115-L135" }, { "kind": "interface", @@ -135094,7 +135083,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L138-L143" + "specLocation": "ml/_types/TrainedModel.ts#L137-L142" }, { "kind": "interface", @@ -137546,7 +137535,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L448-L465" + "specLocation": "ml/_types/TrainedModel.ts#L447-L464" }, { "kind": "interface", @@ -137562,7 +137551,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "ByteSize", "namespace": "_types" } } @@ -137679,7 +137668,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L358-L394" + "specLocation": "ml/_types/TrainedModel.ts#L357-L393" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 3aa909e3af..55602b03ec 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -149672,7 +149672,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L110-L114" + "specLocation": "ml/_types/TrainedModel.ts#L109-L113" }, { "kind": "interface", @@ -154934,7 +154934,7 @@ "name": "DeploymentAllocationState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L319-L332" + "specLocation": "ml/_types/TrainedModel.ts#L318-L331" }, { "kind": "enum", @@ -154960,7 +154960,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L334-L351" + "specLocation": "ml/_types/TrainedModel.ts#L333-L350" }, { "kind": "interface", @@ -156005,7 +156005,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L262-L276" + "specLocation": "ml/_types/TrainedModel.ts#L261-L275" }, { "kind": "interface", @@ -158084,7 +158084,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L245-L260" + "specLocation": "ml/_types/TrainedModel.ts#L244-L259" }, { "kind": "interface", @@ -159496,7 +159496,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L396-L417" + "specLocation": "ml/_types/TrainedModel.ts#L395-L416" }, { "kind": "enum", @@ -160191,7 +160191,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L278-L285" + "specLocation": "ml/_types/TrainedModel.ts#L277-L284" }, { "kind": "interface", @@ -160228,7 +160228,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L287-L292" + "specLocation": "ml/_types/TrainedModel.ts#L286-L291" }, { "kind": "interface", @@ -160274,7 +160274,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L294-L301" + "specLocation": "ml/_types/TrainedModel.ts#L293-L300" }, { "kind": "interface", @@ -160387,7 +160387,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L448-L465" + "specLocation": "ml/_types/TrainedModel.ts#L447-L464" }, { "kind": "interface", @@ -160423,7 +160423,7 @@ { "description": "Current number of allocations.", "name": "current_allocations", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -160435,7 +160435,7 @@ { "description": "Target number of allocations.", "name": "target_allocations", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -160445,7 +160445,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L419-L437" + "specLocation": "ml/_types/TrainedModel.ts#L418-L436" }, { "kind": "interface", @@ -160461,7 +160461,7 @@ "type": { "kind": "instance_of", "type": { - "name": "integer", + "name": "ByteSize", "namespace": "_types" } } @@ -160578,7 +160578,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L358-L394" + "specLocation": "ml/_types/TrainedModel.ts#L357-L393" }, { "kind": "interface", @@ -160837,7 +160837,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L192-L228" + "specLocation": "ml/_types/TrainedModel.ts#L191-L227" }, { "kind": "interface", @@ -160862,7 +160862,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L230-L233" + "specLocation": "ml/_types/TrainedModel.ts#L229-L232" }, { "kind": "interface", @@ -160939,7 +160939,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L235-L243" + "specLocation": "ml/_types/TrainedModel.ts#L234-L242" }, { "kind": "interface", @@ -160985,7 +160985,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L439-L446" + "specLocation": "ml/_types/TrainedModel.ts#L438-L445" }, { "kind": "interface", @@ -161112,7 +161112,7 @@ { "kind": "instance_of", "type": { - "name": "UnitNanos", + "name": "UnitMillis", "namespace": "_types" } } @@ -161207,7 +161207,7 @@ { "kind": "instance_of", "type": { - "name": "UnitNanos", + "name": "UnitMillis", "namespace": "_types" } } @@ -161232,7 +161232,7 @@ }, { "name": "throughput_last_minute", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -161254,7 +161254,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L145-L190" + "specLocation": "ml/_types/TrainedModel.ts#L144-L189" }, { "kind": "interface", @@ -161277,7 +161277,7 @@ { "description": "The detailed allocation status for the deployment.", "name": "allocation_status", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -161454,7 +161454,7 @@ { "description": "The overall state of the deployment.", "name": "state", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -161488,7 +161488,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L63-L108" + "specLocation": "ml/_types/TrainedModel.ts#L62-L107" }, { "kind": "interface", @@ -161712,7 +161712,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L116-L136" + "specLocation": "ml/_types/TrainedModel.ts#L115-L135" }, { "kind": "interface", @@ -161733,7 +161733,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L467-L469" + "specLocation": "ml/_types/TrainedModel.ts#L466-L468" }, { "kind": "interface", @@ -161754,7 +161754,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L471-L473" + "specLocation": "ml/_types/TrainedModel.ts#L470-L472" }, { "kind": "interface", @@ -161786,20 +161786,9 @@ "namespace": "_builtins" } } - }, - { - "name": "none", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } } ], - "specLocation": "ml/_types/TrainedModel.ts#L475-L486" + "specLocation": "ml/_types/TrainedModel.ts#L474-L483" }, { "kind": "interface", @@ -161833,7 +161822,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L138-L143" + "specLocation": "ml/_types/TrainedModel.ts#L137-L142" }, { "kind": "interface", @@ -161924,7 +161913,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L43-L61" + "specLocation": "ml/_types/TrainedModel.ts#L42-L60" }, { "kind": "enum", @@ -161946,7 +161935,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L303-L317" + "specLocation": "ml/_types/TrainedModel.ts#L302-L316" }, { "kind": "enum", @@ -161962,7 +161951,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L353-L356" + "specLocation": "ml/_types/TrainedModel.ts#L352-L355" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index ad642b0f16..3658a55636 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -14733,12 +14733,12 @@ export interface MlTrainedModelAssignment { export interface MlTrainedModelAssignmentRoutingTable { reason?: string routing_state: MlRoutingState - current_allocations?: integer - target_allocations?: integer + current_allocations: integer + target_allocations: integer } export interface MlTrainedModelAssignmentTaskParameters { - model_bytes: integer + model_bytes: ByteSize model_id: Id deployment_id: Id cache_size?: ByteSize @@ -14798,22 +14798,22 @@ export interface MlTrainedModelDeploymentNodesStats { inference_count?: long inference_cache_hit_count?: long inference_cache_hit_count_last_minute?: long - last_access?: EpochTime + last_access?: EpochTime node?: MlDiscoveryNode number_of_allocations?: integer number_of_pending_requests?: integer peak_throughput_per_minute: long rejection_execution_count?: integer routing_state: MlTrainedModelAssignmentRoutingTable - start_time?: EpochTime + start_time?: EpochTime threads_per_allocation?: integer - throughput_last_minute?: integer + throughput_last_minute: integer timeout_count?: integer } export interface MlTrainedModelDeploymentStats { adaptive_allocations?: MlAdaptiveAllocationsSettings - allocation_status: MlTrainedModelDeploymentAllocationStatus + allocation_status?: MlTrainedModelDeploymentAllocationStatus cache_size?: ByteSize deployment_id: Id error_count?: integer @@ -14827,7 +14827,7 @@ export interface MlTrainedModelDeploymentStats { rejected_execution_count?: integer reason?: string start_time: EpochTime - state: MlDeploymentAssignmentState + state?: MlDeploymentAssignmentState threads_per_allocation?: integer timeout_count?: integer } @@ -14870,7 +14870,6 @@ export interface MlTrainedModelLocationIndex { export interface MlTrainedModelPrefixStrings { ingest?: string search?: string - none?: string } export interface MlTrainedModelSizeStats { diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 17db7f3a8d..d21c37e678 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -34,8 +34,7 @@ import { DurationValue, EpochTime, UnitFloatMillis, - UnitMillis, - UnitNanos + UnitMillis } from '@_types/Time' import { DiscoveryNode } from './DiscoveryNode' import { InferenceConfigCreateContainer } from './inference' @@ -359,7 +358,7 @@ export class TrainedModelAssignmentTaskParameters { /** * The size of the trained model in bytes. */ - model_bytes: integer + model_bytes: ByteSize /** * The unique identifier for the trained model. */ @@ -429,11 +428,11 @@ export class TrainedModelAssignmentRoutingTable { /** * Current number of allocations. */ - current_allocations?: integer + current_allocations: integer /** * Target number of allocations. */ - target_allocations?: integer + target_allocations: integer } export class TrainedModelDeploymentAllocationStatus { @@ -481,6 +480,4 @@ export class TrainedModelPrefixStrings { * String prepended to input at search */ search?: string - - none?: string }