diff --git a/output/schema/schema.json b/output/schema/schema.json index 063cd4faa4..4454fd408c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -42435,9 +42435,9 @@ } ], "specLocation": { - "endLine": 193, + "endLine": 194, "path": "_types/aggregations/pipeline.ts", - "startLine": 178 + "startLine": 179 } }, { @@ -43492,9 +43492,9 @@ } ], "specLocation": { - "endLine": 240, + "endLine": 260, "path": "_types/aggregations/pipeline.ts", - "startLine": 238 + "startLine": 258 } }, { @@ -43531,9 +43531,9 @@ } ], "specLocation": { - "endLine": 226, + "endLine": 246, "path": "_types/aggregations/pipeline.ts", - "startLine": 223 + "startLine": 243 } }, { @@ -45255,9 +45255,9 @@ } ], "specLocation": { - "endLine": 245, + "endLine": 265, "path": "_types/aggregations/pipeline.ts", - "startLine": 242 + "startLine": 262 } }, { @@ -45294,9 +45294,9 @@ } ], "specLocation": { - "endLine": 231, + "endLine": 251, "path": "_types/aggregations/pipeline.ts", - "startLine": 228 + "startLine": 248 } }, { @@ -45374,9 +45374,9 @@ } ], "specLocation": { - "endLine": 253, + "endLine": 273, "path": "_types/aggregations/pipeline.ts", - "startLine": 246 + "startLine": 266 } }, { @@ -45413,9 +45413,9 @@ } ], "specLocation": { - "endLine": 236, + "endLine": 256, "path": "_types/aggregations/pipeline.ts", - "startLine": 233 + "startLine": 253 } }, { @@ -45435,9 +45435,9 @@ "namespace": "_types.aggregations" }, "specLocation": { - "endLine": 259, + "endLine": 279, "path": "_types/aggregations/pipeline.ts", - "startLine": 254 + "startLine": 274 } }, { @@ -45642,10 +45642,21 @@ "namespace": "_types.aggregations" } } + }, + { + "name": "ner", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NerInferenceOptions", + "namespace": "_types.aggregations" + } + } } ], "specLocation": { - "endLine": 165, + "endLine": 166, "path": "_types/aggregations/pipeline.ts", "startLine": 160 } @@ -46020,9 +46031,9 @@ } ], "specLocation": { - "endLine": 216, + "endLine": 236, "path": "_types/aggregations/pipeline.ts", - "startLine": 213 + "startLine": 233 } }, { @@ -46482,9 +46493,9 @@ }, "properties": [], "specLocation": { - "endLine": 195, + "endLine": 215, "path": "_types/aggregations/pipeline.ts", - "startLine": 195 + "startLine": 215 } }, { @@ -46638,9 +46649,9 @@ }, "properties": [], "specLocation": { - "endLine": 197, + "endLine": 217, "path": "_types/aggregations/pipeline.ts", - "startLine": 197 + "startLine": 217 } }, { @@ -46815,9 +46826,9 @@ "namespace": "_types.aggregations" }, "specLocation": { - "endLine": 205, + "endLine": 225, "path": "_types/aggregations/pipeline.ts", - "startLine": 199 + "startLine": 219 }, "type": { "items": [ @@ -46912,9 +46923,9 @@ } ], "specLocation": { - "endLine": 211, + "endLine": 231, "path": "_types/aggregations/pipeline.ts", - "startLine": 207 + "startLine": 227 } }, { @@ -46965,9 +46976,9 @@ } ], "specLocation": { - "endLine": 265, + "endLine": 285, "path": "_types/aggregations/pipeline.ts", - "startLine": 261 + "startLine": 281 } }, { @@ -47018,9 +47029,9 @@ } ], "specLocation": { - "endLine": 271, + "endLine": 291, "path": "_types/aggregations/pipeline.ts", - "startLine": 267 + "startLine": 287 } }, { @@ -47324,6 +47335,150 @@ "startLine": 295 } }, + { + "kind": "interface", + "name": { + "name": "NerInferenceOptions", + "namespace": "_types.aggregations" + }, + "properties": [ + { + "name": "tokenization", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "NerInferenceTokenization", + "namespace": "_types.aggregations" + } + } + }, + { + "name": "vocabulary", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "NerInferenceVocabulary", + "namespace": "_types.aggregations" + } + } + } + ], + "specLocation": { + "endLine": 199, + "path": "_types/aggregations/pipeline.ts", + "startLine": 196 + } + }, + { + "kind": "interface", + "name": { + "name": "NerInferenceTokenization", + "namespace": "_types.aggregations" + }, + "properties": [ + { + "name": "bert", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "NerInferenceTokenizationBert", + "namespace": "_types.aggregations" + } + } + } + ], + "specLocation": { + "endLine": 203, + "path": "_types/aggregations/pipeline.ts", + "startLine": 201 + } + }, + { + "kind": "interface", + "name": { + "name": "NerInferenceTokenizationBert", + "namespace": "_types.aggregations" + }, + "properties": [ + { + "name": "do_lower_case", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "max_sequence_length", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "truncate", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "with_special_tokens", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": { + "endLine": 209, + "path": "_types/aggregations/pipeline.ts", + "startLine": 204 + } + }, + { + "kind": "interface", + "name": { + "name": "NerInferenceVocabulary", + "namespace": "_types.aggregations" + }, + "properties": [ + { + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + } + ], + "specLocation": { + "endLine": 213, + "path": "_types/aggregations/pipeline.ts", + "startLine": 211 + } + }, { "attachedBehaviors": [ "AdditionalProperties" @@ -47404,9 +47559,9 @@ } ], "specLocation": { - "endLine": 275, + "endLine": 295, "path": "_types/aggregations/pipeline.ts", - "startLine": 273 + "startLine": 293 } }, { @@ -47437,9 +47592,9 @@ "namespace": "_types.aggregations" }, "specLocation": { - "endLine": 285, + "endLine": 305, "path": "_types/aggregations/pipeline.ts", - "startLine": 277 + "startLine": 297 } }, { @@ -47773,9 +47928,9 @@ } ], "specLocation": { - "endLine": 289, + "endLine": 309, "path": "_types/aggregations/pipeline.ts", - "startLine": 287 + "startLine": 307 } }, { @@ -48255,9 +48410,9 @@ } ], "specLocation": { - "endLine": 176, + "endLine": 177, "path": "_types/aggregations/pipeline.ts", - "startLine": 167 + "startLine": 168 } }, { @@ -48552,9 +48707,9 @@ } ], "specLocation": { - "endLine": 293, + "endLine": 313, "path": "_types/aggregations/pipeline.ts", - "startLine": 291 + "startLine": 311 } }, { @@ -49173,9 +49328,9 @@ } ], "specLocation": { - "endLine": 221, + "endLine": 241, "path": "_types/aggregations/pipeline.ts", - "startLine": 218 + "startLine": 238 } }, { @@ -49754,9 +49909,9 @@ }, "properties": [], "specLocation": { - "endLine": 295, + "endLine": 315, "path": "_types/aggregations/pipeline.ts", - "startLine": 295 + "startLine": 315 } }, { @@ -50163,9 +50318,9 @@ }, "properties": [], "specLocation": { - "endLine": 297, + "endLine": 317, "path": "_types/aggregations/pipeline.ts", - "startLine": 297 + "startLine": 317 } }, { @@ -129694,9 +129849,9 @@ "namespace": "ml._types" }, "specLocation": { - "endLine": 376, + "endLine": 366, "path": "ml/_types/TrainedModel.ts", - "startLine": 376 + "startLine": 366 }, "type": { "items": [ @@ -129747,7 +129902,7 @@ "namespace": "ml._types" }, "specLocation": { - "endLine": 325, + "endLine": 315, "path": "ml/_types/TrainedModel.ts", "startLine": 304 } @@ -129940,9 +130095,9 @@ } ], "specLocation": { - "endLine": 374, + "endLine": 364, "path": "ml/_types/TrainedModel.ts", - "startLine": 370 + "startLine": 360 } }, { @@ -130159,9 +130314,9 @@ } ], "specLocation": { - "endLine": 362, + "endLine": 352, "path": "ml/_types/TrainedModel.ts", - "startLine": 348 + "startLine": 338 } }, { @@ -130197,9 +130352,9 @@ } ], "specLocation": { - "endLine": 337, + "endLine": 327, "path": "ml/_types/TrainedModel.ts", - "startLine": 327 + "startLine": 317 } }, { @@ -130624,9 +130779,9 @@ } ], "specLocation": { - "endLine": 346, + "endLine": 336, "path": "ml/_types/TrainedModel.ts", - "startLine": 339 + "startLine": 329 } }, { @@ -131021,9 +131176,9 @@ } ], "specLocation": { - "endLine": 369, + "endLine": 359, "path": "ml/_types/TrainedModel.ts", - "startLine": 363 + "startLine": 353 } }, { @@ -131122,9 +131277,9 @@ } ], "specLocation": { - "endLine": 380, + "endLine": 370, "path": "ml/_types/TrainedModel.ts", - "startLine": 378 + "startLine": 368 } }, { @@ -131147,9 +131302,9 @@ } ], "specLocation": { - "endLine": 384, + "endLine": 374, "path": "ml/_types/TrainedModel.ts", - "startLine": 382 + "startLine": 372 } }, { @@ -136541,13 +136696,13 @@ }, "path": [ { - "description": "The unique identifier of the trained model.", + "description": "The unique identifier(s) of the trained model.", "name": "model_id", "required": false, "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "Ids", "namespace": "_types" } } @@ -136635,17 +136790,45 @@ "description": "A comma delimited string of tags. A trained model can have many tags, or\nnone. When supplied, only trained models that contain all the supplied\ntags are returned.", "name": "tags", "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" + } + }, + { + "description": "Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.", + "name": "include_model_definition", + "required": false, + "since": "7.17.0", "type": { "kind": "instance_of", "type": { - "name": "string", + "name": "boolean", "namespace": "_builtins" } } } ], "specLocation": { - "endLine": 87, + "endLine": 91, "path": "ml/get_trained_models/MlGetTrainedModelRequest.ts", "startLine": 25 } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 5105c7592f..f51bdc8149 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1359,7 +1359,6 @@ }, "ml.get_trained_models": { "request": [ - "Request: missing json spec query parameter 'include_model_definition'", "Request: should not have a body" ], "response": [] diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 717e679daa..501b5c43c6 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -3158,6 +3158,7 @@ export interface AggregationsInferenceClassImportance { export interface AggregationsInferenceConfigContainer { regression?: AggregationsRegressionInferenceOptions classification?: AggregationsClassificationInferenceOptions + ner?: AggregationsNerInferenceOptions } export interface AggregationsInferenceFeatureImportance { @@ -3344,6 +3345,26 @@ export interface AggregationsMutualInformationHeuristic { include_negatives?: boolean } +export interface AggregationsNerInferenceOptions { + tokenization: AggregationsNerInferenceTokenization + vocabulary: AggregationsNerInferenceVocabulary +} + +export interface AggregationsNerInferenceTokenization { + bert: AggregationsNerInferenceTokenizationBert +} + +export interface AggregationsNerInferenceTokenizationBert { + do_lower_case: boolean + max_sequence_length: integer + truncate: string + with_special_tokens: boolean +} + +export interface AggregationsNerInferenceVocabulary { + index: IndexName +} + export interface AggregationsNestedAggregateKeys extends AggregationsSingleBucketAggregateBase { } export type AggregationsNestedAggregate = AggregationsNestedAggregateKeys @@ -12819,14 +12840,15 @@ export interface MlGetRecordsResponse { } export interface MlGetTrainedModelsRequest extends RequestBase { - model_id?: Id + model_id?: Ids allow_no_match?: boolean decompress_definition?: boolean exclude_generated?: boolean from?: integer include?: MlInclude size?: integer - tags?: string + tags?: string | string[] + include_model_definition?: boolean } export interface MlGetTrainedModelsResponse { diff --git a/specification/_types/aggregations/pipeline.ts b/specification/_types/aggregations/pipeline.ts index c219f64b73..f03d3c2b32 100644 --- a/specification/_types/aggregations/pipeline.ts +++ b/specification/_types/aggregations/pipeline.ts @@ -19,7 +19,7 @@ import { Sort } from '@_types/sort' import { Dictionary } from '@spec_utils/Dictionary' -import { Name, Field, EmptyObject } from '@_types/common' +import { Name, Field, EmptyObject, IndexName } from '@_types/common' import { integer, double, float } from '@_types/Numeric' import { Script } from '@_types/Scripting' import { Aggregation } from './Aggregation' @@ -162,6 +162,7 @@ export class InferenceConfigContainer { regression?: RegressionInferenceOptions /** Classification configuration for inference. */ classification?: ClassificationInferenceOptions + ner?: NerInferenceOptions } export class RegressionInferenceOptions { @@ -192,6 +193,25 @@ export class ClassificationInferenceOptions { top_classes_results_field?: string } +export class NerInferenceOptions { + tokenization: NerInferenceTokenization + vocabulary: NerInferenceVocabulary +} + +export class NerInferenceTokenization { + bert: NerInferenceTokenizationBert +} +export class NerInferenceTokenizationBert { + do_lower_case: boolean + max_sequence_length: integer + truncate: string + with_special_tokens: boolean +} + +export class NerInferenceVocabulary { + index: IndexName +} + export class MaxBucketAggregation extends PipelineAggregationBase {} export class MinBucketAggregation extends PipelineAggregationBase {} diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 7b0c636251..4b293e152f 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -302,26 +302,16 @@ export class TrainedModelAllocationTaskParameters { } export enum RoutingState { - /** - * The allocation attempt failed. - */ - failed = 0, - /** - * The trained model is allocated and ready to accept inference requests. - */ - started = 1, - /** - * The trained model is attempting to allocate on this node; inference requests are not yet accepted. - */ - starting = 2, - /** - * The trained model is fully deallocated from this node. - */ - stopped = 3, - /** - * The trained model is being deallocated from this node. - */ - stopping = 4 + /** The allocation attempt failed. */ + failed, + /** The trained model is allocated and ready to accept inference requests. */ + started, + /** The trained model is attempting to allocate on this node; inference requests are not yet accepted. */ + starting, + /** The trained model is fully deallocated from this node. */ + stopped, + /** The trained model is being deallocated from this node. */ + stopping } export class TrainedModelAllocationRoutingTable { diff --git a/specification/ml/get_trained_models/MlGetTrainedModelRequest.ts b/specification/ml/get_trained_models/MlGetTrainedModelRequest.ts index f0c4e72861..7a8ce1eebd 100644 --- a/specification/ml/get_trained_models/MlGetTrainedModelRequest.ts +++ b/specification/ml/get_trained_models/MlGetTrainedModelRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { Id } from '@_types/common' +import { Ids } from '@_types/common' import { integer } from '@_types/Numeric' import { Include } from '@ml/_types/Include' @@ -32,9 +32,9 @@ import { Include } from '@ml/_types/Include' export interface Request extends RequestBase { path_parts: { /** - * The unique identifier of the trained model. + * The unique identifiers of the trained model. */ - model_id?: Id + model_id?: Ids } query_parameters: { /** @@ -82,6 +82,11 @@ export interface Request extends RequestBase { * none. When supplied, only trained models that contain all the supplied * tags are returned. */ - tags?: string + tags?: string | string[] + /** + * @since 7.6.0 + * @deprecated 7.10.0 + */ + include_model_definition?: boolean } }