From 57b71344e58fd6f1df8484f7439bcd00e2243ba7 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 5 Dec 2024 12:32:22 +0100 Subject: [PATCH] correcting types --- output/openapi/elasticsearch-openapi.json | 40 +++-- .../elasticsearch-serverless-openapi.json | 32 ++-- output/schema/schema-serverless.json | 114 +++++++------- output/schema/schema.json | 146 ++++++++++-------- output/typescript/types.ts | 24 +-- specification/_types/common.ts | 8 +- specification/ml/_types/Analysis.ts | 4 +- specification/ml/_types/Datafeed.ts | 4 +- specification/ml/_types/Model.ts | 2 +- specification/ml/_types/TrainedModel.ts | 13 +- specification/ml/info/types.ts | 6 +- .../ml/post_data/MlPostJobDataResponse.ts | 5 +- 12 files changed, 213 insertions(+), 185 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 8403f3a134..83cb638426 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -20347,7 +20347,7 @@ "type": "number" }, "earliest_record_timestamp": { - "type": "number" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "empty_bucket_count": { "type": "number" @@ -20371,7 +20371,7 @@ "type": "number" }, "latest_record_timestamp": { - "type": "number" + "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" }, "missing_field_count": { "type": "number" @@ -74192,7 +74192,7 @@ "type": "object", "properties": { "incremental_metric_value_ms": { - "type": "number" + "$ref": "#/components/schemas/_types:DurationValueUnitFloatMillis" }, "latest_timestamp": { "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" @@ -74690,7 +74690,7 @@ "$ref": "#/components/schemas/_types:ByteSize" }, "output_memory_allocator_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "peak_model_bytes": { "$ref": "#/components/schemas/_types:ByteSize" @@ -74891,15 +74891,7 @@ "type": "number" }, "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the `xpack.ml.max_model_memory_limit` setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of `b` or `kb` and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to create jobs that have `model_memory_limit` values greater than that setting value.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "$ref": "#/components/schemas/_types:ByteSize" } } }, @@ -76166,7 +76158,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelPrefixStrings" }, "size": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "sha256": { "type": "string" @@ -76410,8 +76402,7 @@ "type": "number" }, "last_access": { - "description": "The epoch time stamp of the last inference call for the model on this node.", - "type": "number" + "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" }, "node": { "$ref": "#/components/schemas/ml._types:DiscoveryNode" @@ -76435,7 +76426,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelAssignmentRoutingTable" }, "start_time": { - "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" + "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" }, "threads_per_allocation": { "description": "The number of threads used by each allocation during inference.", @@ -76454,6 +76445,13 @@ "routing_state" ] }, + "_types:EpochTimeUnitNanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:UnitNanos" + } + ] + }, "ml._types:TrainedModelAssignmentRoutingTable": { "type": "object", "properties": { @@ -76952,10 +76950,10 @@ "type": "number" }, "max_model_memory_limit": { - "type": "string" + "$ref": "#/components/schemas/_types:ByteSize" }, "effective_max_model_memory_limit": { - "type": "string" + "$ref": "#/components/schemas/_types:ByteSize" }, "total_ml_memory": { "type": "string" @@ -77572,10 +77570,10 @@ "$ref": "#/components/schemas/ml._types:TrainingPriority" }, "per_deployment_memory_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "per_allocation_memory_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "queue_capacity": { "description": "Number of inference requests are allowed in the queue at a time.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index ae4c9112f4..a4e9fb1bbc 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -49603,7 +49603,7 @@ "type": "object", "properties": { "incremental_metric_value_ms": { - "type": "number" + "$ref": "#/components/schemas/_types:DurationValueUnitFloatMillis" }, "latest_timestamp": { "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" @@ -50041,7 +50041,7 @@ "$ref": "#/components/schemas/_types:ByteSize" }, "output_memory_allocator_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "peak_model_bytes": { "$ref": "#/components/schemas/_types:ByteSize" @@ -50242,15 +50242,7 @@ "type": "number" }, "model_memory_limit": { - "description": "The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the `xpack.ml.max_model_memory_limit` setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of `b` or `kb` and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to create jobs that have `model_memory_limit` values greater than that setting value.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "$ref": "#/components/schemas/_types:ByteSize" } } }, @@ -50964,7 +50956,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelPrefixStrings" }, "size": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "sha256": { "type": "string" @@ -51208,8 +51200,7 @@ "type": "number" }, "last_access": { - "description": "The epoch time stamp of the last inference call for the model on this node.", - "type": "number" + "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" }, "number_of_allocations": { "description": "The number of allocations assigned to this node.", @@ -51230,7 +51221,7 @@ "$ref": "#/components/schemas/ml._types:TrainedModelAssignmentRoutingTable" }, "start_time": { - "$ref": "#/components/schemas/_types:EpochTimeUnitMillis" + "$ref": "#/components/schemas/_types:EpochTimeUnitNanos" }, "threads_per_allocation": { "description": "The number of threads used by each allocation during inference.", @@ -51249,6 +51240,13 @@ "routing_state" ] }, + "_types:EpochTimeUnitNanos": { + "allOf": [ + { + "$ref": "#/components/schemas/_types:UnitNanos" + } + ] + }, "ml._types:TrainedModelAssignmentRoutingTable": { "type": "object", "properties": { @@ -52288,10 +52286,10 @@ "$ref": "#/components/schemas/ml._types:TrainingPriority" }, "per_deployment_memory_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "per_allocation_memory_bytes": { - "type": "number" + "$ref": "#/components/schemas/_types:ByteSize" }, "queue_capacity": { "description": "Number of inference requests are allowed in the queue at a time.", diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 82de1f0d06..f0ef748ccc 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#L318-L331" + "specLocation": "ml/_types/TrainedModel.ts#L319-L332" }, { "kind": "enum", @@ -95150,7 +95150,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L333-L350" + "specLocation": "ml/_types/TrainedModel.ts#L334-L351" }, { "kind": "type_alias", @@ -95495,7 +95495,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L395-L416" + "specLocation": "ml/_types/TrainedModel.ts#L396-L417" }, { "kind": "enum", @@ -95576,7 +95576,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L302-L316" + "specLocation": "ml/_types/TrainedModel.ts#L303-L317" }, { "kind": "enum", @@ -95592,7 +95592,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L352-L355" + "specLocation": "ml/_types/TrainedModel.ts#L353-L356" }, { "codegenNames": [ @@ -130350,9 +130350,18 @@ "name": "incremental_metric_value_ms", "required": true, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitFloatMillis", + "namespace": "_types" + } + } + ], "kind": "instance_of", "type": { - "name": "double", + "name": "DurationValue", "namespace": "_types" } } @@ -130894,7 +130903,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "exclude", @@ -130909,7 +130918,7 @@ }, { "deprecation": { - "description": "this query param will be replaced by the selector `::` on the expression level", + "description": "this query param will be replaced by the selector `::` on the expression level.", "version": "8.16.0" }, "name": "failure_store", @@ -130950,7 +130959,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "include", @@ -130965,7 +130974,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "only", @@ -131598,7 +131607,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -132225,23 +132234,11 @@ "required": false, "serverDefault": "1024mb", "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } } } ], @@ -132802,7 +132799,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L191-L227" + "specLocation": "ml/_types/TrainedModel.ts#L192-L228" }, { "description": "Inference configuration provided when storing the model config", @@ -133762,7 +133759,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L229-L232" + "specLocation": "ml/_types/TrainedModel.ts#L230-L233" }, { "kind": "interface", @@ -133839,7 +133836,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L234-L242" + "specLocation": "ml/_types/TrainedModel.ts#L235-L243" }, { "kind": "interface", @@ -133911,7 +133908,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L261-L275" + "specLocation": "ml/_types/TrainedModel.ts#L262-L276" }, { "kind": "interface", @@ -133963,7 +133960,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L277-L284" + "specLocation": "ml/_types/TrainedModel.ts#L278-L285" }, { "kind": "interface", @@ -134009,7 +134006,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L293-L300" + "specLocation": "ml/_types/TrainedModel.ts#L294-L301" }, { "kind": "interface", @@ -134046,7 +134043,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L286-L291" + "specLocation": "ml/_types/TrainedModel.ts#L287-L292" }, { "kind": "interface", @@ -134187,7 +134184,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -134229,7 +134226,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L244-L259" + "specLocation": "ml/_types/TrainedModel.ts#L245-L260" }, { "kind": "interface", @@ -134274,7 +134271,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L474-L485" + "specLocation": "ml/_types/TrainedModel.ts#L475-L486" }, { "kind": "interface", @@ -134295,7 +134292,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L466-L468" + "specLocation": "ml/_types/TrainedModel.ts#L467-L469" }, { "kind": "interface", @@ -134316,7 +134313,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L470-L472" + "specLocation": "ml/_types/TrainedModel.ts#L471-L473" }, { "kind": "interface", @@ -134407,7 +134404,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L42-L60" + "specLocation": "ml/_types/TrainedModel.ts#L43-L61" }, { "kind": "interface", @@ -134641,7 +134638,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L62-L107" + "specLocation": "ml/_types/TrainedModel.ts#L63-L108" }, { "kind": "interface", @@ -134684,7 +134681,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L109-L113" + "specLocation": "ml/_types/TrainedModel.ts#L110-L114" }, { "kind": "interface", @@ -134730,7 +134727,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L438-L445" + "specLocation": "ml/_types/TrainedModel.ts#L439-L446" }, { "kind": "interface", @@ -134852,9 +134849,18 @@ "name": "last_access", "required": false, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitNanos", + "namespace": "_types" + } + } + ], "kind": "instance_of", "type": { - "name": "long", + "name": "EpochTime", "namespace": "_types" } } @@ -134927,7 +134933,7 @@ { "kind": "instance_of", "type": { - "name": "UnitMillis", + "name": "UnitNanos", "namespace": "_types" } } @@ -134975,7 +134981,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L144-L189" + "specLocation": "ml/_types/TrainedModel.ts#L145-L190" }, { "kind": "interface", @@ -135033,7 +135039,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L418-L436" + "specLocation": "ml/_types/TrainedModel.ts#L419-L437" }, { "kind": "interface", @@ -135114,7 +135120,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L115-L135" + "specLocation": "ml/_types/TrainedModel.ts#L116-L136" }, { "kind": "interface", @@ -135148,7 +135154,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L137-L142" + "specLocation": "ml/_types/TrainedModel.ts#L138-L143" }, { "kind": "interface", @@ -137600,7 +137606,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L447-L464" + "specLocation": "ml/_types/TrainedModel.ts#L448-L465" }, { "kind": "interface", @@ -137692,7 +137698,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -137703,7 +137709,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -137733,7 +137739,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L357-L393" + "specLocation": "ml/_types/TrainedModel.ts#L358-L394" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index ec90fa1e78..af9d3faf42 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -45711,7 +45711,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "exclude", @@ -45726,7 +45726,7 @@ }, { "deprecation": { - "description": "this query param will be replaced by the selector `::` on the expression level", + "description": "this query param will be replaced by the selector `::` on the expression level.", "version": "8.16.0" }, "name": "failure_store", @@ -45767,7 +45767,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "include", @@ -45782,7 +45782,7 @@ }, { "deprecation": { - "description": "this value will be replaced by the selector `::*` on the expression level", + "description": "this value will be replaced by the selector `::*` on the expression level.", "version": "8.16.0" }, "name": "only", @@ -149732,7 +149732,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L109-L113" + "specLocation": "ml/_types/TrainedModel.ts#L110-L114" }, { "kind": "interface", @@ -150086,23 +150086,11 @@ "required": false, "serverDefault": "1024mb", "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - ] + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } } } ], @@ -155006,7 +154994,7 @@ "name": "DeploymentAllocationState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L318-L331" + "specLocation": "ml/_types/TrainedModel.ts#L319-L332" }, { "kind": "enum", @@ -155032,7 +155020,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L333-L350" + "specLocation": "ml/_types/TrainedModel.ts#L334-L351" }, { "kind": "interface", @@ -155699,8 +155687,17 @@ "required": true, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitFloatMillis", + "namespace": "_types" + } + } + ], "type": { - "name": "double", + "name": "DurationValue", "namespace": "_types" } } @@ -156068,7 +156065,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L261-L275" + "specLocation": "ml/_types/TrainedModel.ts#L262-L276" }, { "kind": "interface", @@ -158105,7 +158102,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -158147,7 +158144,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L244-L259" + "specLocation": "ml/_types/TrainedModel.ts#L245-L260" }, { "kind": "interface", @@ -158299,7 +158296,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -159559,7 +159556,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L395-L416" + "specLocation": "ml/_types/TrainedModel.ts#L396-L417" }, { "kind": "enum", @@ -160254,7 +160251,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L277-L284" + "specLocation": "ml/_types/TrainedModel.ts#L278-L285" }, { "kind": "interface", @@ -160291,7 +160288,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L286-L291" + "specLocation": "ml/_types/TrainedModel.ts#L287-L292" }, { "kind": "interface", @@ -160337,7 +160334,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L293-L300" + "specLocation": "ml/_types/TrainedModel.ts#L294-L301" }, { "kind": "interface", @@ -160450,7 +160447,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L447-L464" + "specLocation": "ml/_types/TrainedModel.ts#L448-L465" }, { "kind": "interface", @@ -160508,7 +160505,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L418-L436" + "specLocation": "ml/_types/TrainedModel.ts#L419-L437" }, { "kind": "interface", @@ -160600,7 +160597,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -160611,7 +160608,7 @@ "type": { "kind": "instance_of", "type": { - "name": "long", + "name": "ByteSize", "namespace": "_types" } } @@ -160641,7 +160638,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L357-L393" + "specLocation": "ml/_types/TrainedModel.ts#L358-L394" }, { "kind": "interface", @@ -160900,7 +160897,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L191-L227" + "specLocation": "ml/_types/TrainedModel.ts#L192-L228" }, { "kind": "interface", @@ -160925,7 +160922,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L229-L232" + "specLocation": "ml/_types/TrainedModel.ts#L230-L233" }, { "kind": "interface", @@ -161002,7 +160999,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L234-L242" + "specLocation": "ml/_types/TrainedModel.ts#L235-L243" }, { "kind": "interface", @@ -161048,7 +161045,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L438-L445" + "specLocation": "ml/_types/TrainedModel.ts#L439-L446" }, { "kind": "interface", @@ -161171,8 +161168,17 @@ "required": false, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitNanos", + "namespace": "_types" + } + } + ], "type": { - "name": "long", + "name": "EpochTime", "namespace": "_types" } } @@ -161261,7 +161267,7 @@ { "kind": "instance_of", "type": { - "name": "UnitMillis", + "name": "UnitNanos", "namespace": "_types" } } @@ -161308,7 +161314,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L144-L189" + "specLocation": "ml/_types/TrainedModel.ts#L145-L190" }, { "kind": "interface", @@ -161542,7 +161548,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L62-L107" + "specLocation": "ml/_types/TrainedModel.ts#L63-L108" }, { "kind": "interface", @@ -161766,7 +161772,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L115-L135" + "specLocation": "ml/_types/TrainedModel.ts#L116-L136" }, { "kind": "interface", @@ -161787,7 +161793,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L466-L468" + "specLocation": "ml/_types/TrainedModel.ts#L467-L469" }, { "kind": "interface", @@ -161808,7 +161814,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L470-L472" + "specLocation": "ml/_types/TrainedModel.ts#L471-L473" }, { "kind": "interface", @@ -161853,7 +161859,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L474-L485" + "specLocation": "ml/_types/TrainedModel.ts#L475-L486" }, { "kind": "interface", @@ -161887,7 +161893,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L137-L142" + "specLocation": "ml/_types/TrainedModel.ts#L138-L143" }, { "kind": "interface", @@ -161978,7 +161984,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L42-L60" + "specLocation": "ml/_types/TrainedModel.ts#L43-L61" }, { "kind": "enum", @@ -162000,7 +162006,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L302-L316" + "specLocation": "ml/_types/TrainedModel.ts#L303-L317" }, { "kind": "enum", @@ -162016,7 +162022,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L352-L355" + "specLocation": "ml/_types/TrainedModel.ts#L353-L356" }, { "kind": "interface", @@ -168401,8 +168407,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ByteSize", + "namespace": "_types" } } }, @@ -168412,8 +168418,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ByteSize", + "namespace": "_types" } } }, @@ -168838,8 +168844,17 @@ "required": false, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], "type": { - "name": "long", + "name": "EpochTime", "namespace": "_types" } } @@ -168926,8 +168941,17 @@ "required": false, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], "type": { - "name": "long", + "name": "EpochTime", "namespace": "_types" } } @@ -168993,7 +169017,7 @@ "name": "Response", "namespace": "ml.post_data" }, - "specLocation": "ml/post_data/MlPostJobDataResponse.ts#L23-L41" + "specLocation": "ml/post_data/MlPostJobDataResponse.ts#L24-L42" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c1c9b72dec..fdaeff79e7 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13664,7 +13664,7 @@ export interface MlAnalysisConfigRead { export interface MlAnalysisLimits { categorization_examples_limit?: long - model_memory_limit?: string | long + model_memory_limit?: ByteSize } export interface MlAnalysisMemoryLimit { @@ -14243,7 +14243,7 @@ export interface MlDiscoveryNodeContent { export type MlExcludeFrequent = 'all' | 'none' | 'by' | 'over' export interface MlExponentialAverageCalculationContext { - incremental_metric_value_ms: double + incremental_metric_value_ms: DurationValue latest_timestamp?: EpochTime previous_exponential_average_ms?: DurationValue } @@ -14472,7 +14472,7 @@ export interface MlModelPackageConfig { packaged_model_id: Id platform_architecture?: string prefix_strings?: MlTrainedModelPrefixStrings - size?: long + size?: ByteSize sha256?: string tags?: string[] vocabulary_file?: string @@ -14492,7 +14492,7 @@ export interface MlModelSizeStats { model_bytes: ByteSize model_bytes_exceeded?: ByteSize model_bytes_memory_limit?: ByteSize - output_memory_allocator_bytes?: long + output_memory_allocator_bytes?: ByteSize peak_model_bytes?: ByteSize assignment_memory_basis?: string result_type: string @@ -14748,8 +14748,8 @@ export interface MlTrainedModelAssignmentTaskParameters { cache_size?: ByteSize number_of_allocations: integer priority: MlTrainingPriority - per_deployment_memory_bytes: long - per_allocation_memory_bytes: long + per_deployment_memory_bytes: ByteSize + per_allocation_memory_bytes: ByteSize queue_capacity: integer threads_per_allocation: integer } @@ -14802,14 +14802,14 @@ export interface MlTrainedModelDeploymentNodesStats { inference_count?: long inference_cache_hit_count?: long inference_cache_hit_count_last_minute?: long - last_access?: long + 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 timeout_count?: integer @@ -15587,8 +15587,8 @@ export interface MlInfoDefaults { export interface MlInfoLimits { max_single_ml_node_processors?: integer - max_model_memory_limit?: string - effective_max_model_memory_limit: string + max_model_memory_limit?: ByteSize + effective_max_model_memory_limit: ByteSize total_ml_memory: string total_ml_processors?: integer } @@ -15641,7 +15641,7 @@ export interface MlPostDataRequest extends RequestBase { export interface MlPostDataResponse { bucket_count: long - earliest_record_timestamp?: long + earliest_record_timestamp?: EpochTime empty_bucket_count: long input_bytes: long input_field_count: long @@ -15649,7 +15649,7 @@ export interface MlPostDataResponse { invalid_date_count: long job_id: Id last_data_time?: integer - latest_record_timestamp?: long + latest_record_timestamp?: EpochTime missing_field_count: long out_of_order_timestamp_count: long processed_field_count: long diff --git a/specification/_types/common.ts b/specification/_types/common.ts index aea5534ff7..8cf2000dfd 100644 --- a/specification/_types/common.ts +++ b/specification/_types/common.ts @@ -352,12 +352,12 @@ export class IndicesOptions { expand_wildcards?: ExpandWildcards /** - * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level + * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level. */ exclude?: string /** - * @deprecated 8.16.0 this query param will be replaced by the selector `::` on the expression level + * @deprecated 8.16.0 this query param will be replaced by the selector `::` on the expression level. */ failure_store?: string /** @@ -371,12 +371,12 @@ export class IndicesOptions { */ ignore_throttled?: boolean /** - * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level + * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level. */ include?: string /** - * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level + * @deprecated 8.16.0 this value will be replaced by the selector `::*` on the expression level. */ only?: string } diff --git a/specification/ml/_types/Analysis.ts b/specification/ml/_types/Analysis.ts index 017ed2a344..9239b5cd47 100644 --- a/specification/ml/_types/Analysis.ts +++ b/specification/ml/_types/Analysis.ts @@ -21,7 +21,7 @@ import { OverloadOf } from '@spec_utils/behaviors' import { CharFilter } from '@_types/analysis/char_filters' import { Tokenizer } from '@_types/analysis/tokenizers' import { TokenFilter } from '@_types/analysis/token_filters' -import { Field } from '@_types/common' +import { ByteSize, Field } from '@_types/common' import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' import { Detector, DetectorRead } from './Detector' @@ -168,7 +168,7 @@ export class AnalysisLimits { * The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. If the `xpack.ml.max_model_memory_limit` setting has a value greater than 0 and less than 1024mb, that value is used instead of the default. The default value is relatively small to ensure that high resource usage is a conscious decision. If you have jobs that are expected to analyze high cardinality fields, you will likely need to use a higher value. If you specify a number instead of a string, the units are assumed to be MiB. Specifying a string is recommended for clarity. If you specify a byte size unit of `b` or `kb` and the number does not equate to a discrete number of megabytes, it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you specify a value less than 1 MiB, an error occurs. If you specify a value for the `xpack.ml.max_model_memory_limit` setting, an error occurs when you try to create jobs that have `model_memory_limit` values greater than that setting value. * @server_default 1024mb */ - model_memory_limit?: string | long + model_memory_limit?: ByteSize } export class AnalysisMemoryLimit { diff --git a/specification/ml/_types/Datafeed.ts b/specification/ml/_types/Datafeed.ts index 07dc781843..e9e63ee692 100644 --- a/specification/ml/_types/Datafeed.ts +++ b/specification/ml/_types/Datafeed.ts @@ -22,7 +22,7 @@ import { Dictionary } from '@spec_utils/Dictionary' import { AggregationContainer } from '@_types/aggregations/AggregationContainer' import { Id, Indices, IndicesOptions } from '@_types/common' import { RuntimeFields } from '@_types/mapping/RuntimeFields' -import { double, integer, long } from '@_types/Numeric' +import { integer, long } from '@_types/Numeric' import { QueryContainer } from '@_types/query_dsl/abstractions' import { ScriptField } from '@_types/Scripting' import { @@ -202,7 +202,7 @@ export class DatafeedTimingStats { } export class ExponentialAverageCalculationContext { - incremental_metric_value_ms: double + incremental_metric_value_ms: DurationValue latest_timestamp?: EpochTime previous_exponential_average_ms?: DurationValue } diff --git a/specification/ml/_types/Model.ts b/specification/ml/_types/Model.ts index e48a79c4e9..5ad5eb0e38 100644 --- a/specification/ml/_types/Model.ts +++ b/specification/ml/_types/Model.ts @@ -64,7 +64,7 @@ export class ModelSizeStats { model_bytes: ByteSize model_bytes_exceeded?: ByteSize model_bytes_memory_limit?: ByteSize - output_memory_allocator_bytes?: long + output_memory_allocator_bytes?: ByteSize peak_model_bytes?: ByteSize assignment_memory_basis?: string result_type: string diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 574bea671c..c0edc4cb49 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -34,7 +34,8 @@ import { DurationValue, EpochTime, UnitFloatMillis, - UnitMillis + UnitMillis, + UnitNanos } from '@_types/Time' import { DiscoveryNode } from './DiscoveryNode' import { InferenceConfigCreateContainer } from './inference' @@ -160,7 +161,7 @@ export class TrainedModelDeploymentNodesStats { inference_cache_hit_count_last_minute?: long /** The epoch time stamp of the last inference call for the model on this node. */ - last_access?: long + last_access?: EpochTime /** * Information pertaining to the node. * @availability stack @@ -179,7 +180,7 @@ export class TrainedModelDeploymentNodesStats { /** The current routing state and reason for the current routing state for this allocation. */ routing_state: TrainedModelAssignmentRoutingTable /** The epoch timestamp when the allocation started. */ - start_time?: EpochTime + start_time?: EpochTime /** The number of threads used by each allocation during inference. */ threads_per_allocation?: integer @@ -252,7 +253,7 @@ export class ModelPackageConfig { packaged_model_id: Id platform_architecture?: string prefix_strings?: TrainedModelPrefixStrings - size?: long + size?: ByteSize sha256?: string tags?: string[] vocabulary_file?: string @@ -379,8 +380,8 @@ export class TrainedModelAssignmentTaskParameters { number_of_allocations: integer priority: TrainingPriority - per_deployment_memory_bytes: long - per_allocation_memory_bytes: long + per_deployment_memory_bytes: ByteSize + per_allocation_memory_bytes: ByteSize /** * Number of inference requests are allowed in the queue at a time. diff --git a/specification/ml/info/types.ts b/specification/ml/info/types.ts index 3984b4e335..596b4841e1 100644 --- a/specification/ml/info/types.ts +++ b/specification/ml/info/types.ts @@ -18,7 +18,7 @@ */ import { CategorizationAnalyzer } from '@ml/_types/Analysis' -import { VersionString } from '@_types/common' +import { ByteSize, VersionString } from '@_types/common' import { integer } from '@_types/Numeric' export class Defaults { @@ -33,8 +33,8 @@ export class NativeCode { export class Limits { max_single_ml_node_processors?: integer - max_model_memory_limit?: string - effective_max_model_memory_limit: string + max_model_memory_limit?: ByteSize + effective_max_model_memory_limit: ByteSize total_ml_memory: string total_ml_processors?: integer } diff --git a/specification/ml/post_data/MlPostJobDataResponse.ts b/specification/ml/post_data/MlPostJobDataResponse.ts index 5a86825dda..0f279ef596 100644 --- a/specification/ml/post_data/MlPostJobDataResponse.ts +++ b/specification/ml/post_data/MlPostJobDataResponse.ts @@ -19,11 +19,12 @@ import { Id } from '@_types/common' import { integer, long } from '@_types/Numeric' +import { EpochTime, UnitMillis } from '@_types/Time' export class Response { body: { bucket_count: long - earliest_record_timestamp?: long + earliest_record_timestamp?: EpochTime empty_bucket_count: long input_bytes: long input_field_count: long @@ -31,7 +32,7 @@ export class Response { invalid_date_count: long job_id: Id last_data_time?: integer - latest_record_timestamp?: long + latest_record_timestamp?: EpochTime missing_field_count: long out_of_order_timestamp_count: long processed_field_count: long