From 70e89d08077e5ebbc559e43bbd0491208ae17c92 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Thu, 6 Jun 2024 09:42:49 +0200 Subject: [PATCH 1/5] Remove duplicate `store` from `IcuCollationProperty (#2604) --- specification/_types/mapping/specialized.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/_types/mapping/specialized.ts b/specification/_types/mapping/specialized.ts index 92f1400b46..77f952609a 100644 --- a/specification/_types/mapping/specialized.ts +++ b/specification/_types/mapping/specialized.ts @@ -103,10 +103,6 @@ export class IcuCollationProperty extends DocValuesPropertyBase { * Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing. */ null_value?: string - /** - * Whether the field value should be stored and retrievable separately from the `_source` field. - */ - store?: boolean rules?: string language?: string country?: string From 1a137db61a5fb81d032b0d8686be6e732aac34ef Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 6 Jun 2024 07:43:24 +0000 Subject: [PATCH 2/5] Update specification output --- .../openapi/elasticsearch-serverless-openapi.json | 4 ---- output/schema/schema.json | 14 +------------- output/schema/validation-errors.json | 4 +--- output/typescript/types.ts | 1 - 4 files changed, 2 insertions(+), 21 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 6a4924bde4..6e37d5e796 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -49806,10 +49806,6 @@ "description": "Accepts a string value which is substituted for any explicit null values. Defaults to null, which means the field is treated as missing.", "type": "string" }, - "store": { - "description": "Whether the field value should be stored and retrievable separately from the `_source` field.", - "type": "boolean" - }, "rules": { "type": "string" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 67620822d6..90385b6bc9 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -71068,18 +71068,6 @@ } } }, - { - "description": "Whether the field value should be stored and retrievable separately from the `_source` field.", - "name": "store", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, { "name": "rules", "required": false, @@ -71213,7 +71201,7 @@ } } ], - "specLocation": "_types/mapping/specialized.ts#L94-L122" + "specLocation": "_types/mapping/specialized.ts#L94-L118" }, { "kind": "interface", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index aabcbfadca..d797ab751d 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -465,9 +465,7 @@ "request": [ "Request: query parameter 'flat_settings' does not exist in the json spec" ], - "response": [ - "interface definition _types.mapping:IcuCollationProperty - Property 'store' is already defined in an ancestor class" - ] + "response": [] }, "cluster.post_voting_config_exclusions": { "request": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2b5e535696..3103591d9d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5145,7 +5145,6 @@ export interface MappingIcuCollationProperty extends MappingDocValuesPropertyBas index_options?: MappingIndexOptions index?: boolean null_value?: string - store?: boolean rules?: string language?: string country?: string From 8ad5cda9160d8afbfdfbfdfb61d036a7a97383a3 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Thu, 6 Jun 2024 12:52:51 +0200 Subject: [PATCH 3/5] `InferenceResponseResult.predicted_value` is single-or-many (#2606) --- specification/ml/_types/inference.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/ml/_types/inference.ts b/specification/ml/_types/inference.ts index c75a3430de..1782fa5371 100644 --- a/specification/ml/_types/inference.ts +++ b/specification/ml/_types/inference.ts @@ -475,7 +475,7 @@ export class InferenceResponseResult { * For regression models, its a numerical value * For classification models, it may be an integer, double, boolean or string depending on prediction type */ - predicted_value?: PredictedValue[] + predicted_value?: PredictedValue | PredictedValue[] /** * For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted * value. From 718244e7c3d9ad011f8652b61537d525b495b142 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Thu, 6 Jun 2024 10:53:25 +0000 Subject: [PATCH 4/5] Update specification output --- .../elasticsearch-serverless-openapi.json | 15 ++++++++--- output/schema/schema.json | 26 ++++++++++++++----- output/typescript/types.ts | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 6e37d5e796..c0b2272f39 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -58238,10 +58238,17 @@ }, "predicted_value": { "description": "If the model is trained for a text classification or zero shot classification task, the response is the\npredicted class.\nFor named entity recognition (NER) tasks, it contains the annotated text output.\nFor fill mask tasks, it contains the top prediction for replacing the mask token.\nFor text embedding tasks, it contains the raw numerical text embedding values.\nFor regression models, its a numerical value\nFor classification models, it may be an integer, double, boolean or string depending on prediction type", - "type": "array", - "items": { - "$ref": "#/components/schemas/ml._types:PredictedValue" - } + "oneOf": [ + { + "$ref": "#/components/schemas/ml._types:PredictedValue" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ml._types:PredictedValue" + } + } + ] }, "predicted_value_sequence": { "description": "For fill mask tasks, the response contains the input text sequence with the mask token replaced by the predicted\nvalue.\nAdditionally", diff --git a/output/schema/schema.json b/output/schema/schema.json index 90385b6bc9..689e9125e4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -148302,14 +148302,26 @@ "name": "predicted_value", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "PredictedValue", - "namespace": "ml._types" + "items": [ + { + "kind": "instance_of", + "type": { + "name": "PredictedValue", + "namespace": "ml._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "PredictedValue", + "namespace": "ml._types" + } + } } - } + ], + "kind": "union_of" } }, { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3103591d9d..445bc632eb 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13511,7 +13511,7 @@ export interface MlInferenceConfigUpdateContainer { export interface MlInferenceResponseResult { entities?: MlTrainedModelEntities[] is_truncated?: boolean - predicted_value?: MlPredictedValue[] + predicted_value?: MlPredictedValue | MlPredictedValue[] predicted_value_sequence?: string prediction_probability?: double prediction_score?: double From 8490ee57cf4a3f153f67af819e3949347435708d Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Thu, 6 Jun 2024 13:23:39 +0200 Subject: [PATCH 5/5] Improve `.gitattributes` (#2600) --- .gitattributes | 236 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) diff --git a/.gitattributes b/.gitattributes index 10b2ef08b5..9a11e39750 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,237 @@ +### Header ######################################################################################### + +# The filename patterns in '.gitattributes' are case-sensitive! + +### Line Endings ################################################################################### + +# Set default behavior to automatically normalize line endings +* text=auto + +# Force batch scripts to always use CRLF line endings +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Force bash scripts to always use LF line endings +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +*.zsh text eol=lf + +# Text files where line endings should be preserved +*.patch -text + +### Common ######################################################################################### + +# Configs +.editorconfig text +.gitattributes text export-ignore +.gitignore text export-ignore +.gitkeep text export-ignore +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text +*.cnf text +*.conf text +*.config text +*.ini text + +# Documents +*.markdown text diff=markdown +*.md text diff=markdown +*.mdwn text diff=markdown +*.mdown text diff=markdown +*.mkd text diff=markdown +*.mkdn text diff=markdown +*.mdtxt text +*.mdtext text +*.txt text +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text eol=crlf +*.tab text +*.tsv text +*.sql text +*.epub diff=astextplain +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.docx diff=astextplain +*.dot diff=astextplain +*.pdf diff=astextplain +*.rtf diff=astextplain + +# Documentation +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +# Graphics +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.gifv binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +*.svg text +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# Audio +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +# Video +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.avi binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +# Archives +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +# Executables +*.exe binary +*.pyc binary + +# Misc +Makefile text +Dockerfile text + +### Web ############################################################################################ + +# Source code +*.coffee text +*.css text diff=css +*.htm text diff=html +*.html text diff=html +*.inc text +*.js text +*.mjs text +*.cjs text +*.jsx text +*.less text +*.ls text +*.map text -diff +*.od text +*.onlydata text +*.php text diff=php +*.pl text +*.py text diff=python +*.rb text diff=ruby +*.sass text +*.scm text +*.scss text diff=css +*.sh text eol=lf +.husky/* text eol=lf +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text diff=html + +# Configs +.env text +.htaccess text +*.lock text -diff +package.json text eol=lf +package-lock.json text eol=lf -diff +pnpm-lock.yaml text eol=lf -diff +.prettierrc text +yarn.lock text -diff +browserslist text +# Fixes syntax highlighting on GitHub to allow comments +tsconfig.json linguist-language=JSON-with-Comments + +# Templates +*.dot text +*.ejs text +*.erb text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.svelte text +*.tmpl text +*.tpl text +*.twig text +*.vue text + +# Fonts +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +# RC files (like .babelrc or .eslintrc) +*.*rc text + +# Ignore files (like .npmignore or .gitignore) +*.*ignore text + +# Prevents massive diffs from built files +dist/* binary + +### Linguist Overrides ############################################################################# + output/dangling-types/dangling.csv linguist-generated=true output/schema/schema.json linguist-generated=true output/openapi/elasticsearch-serverless-openapi.json linguist-generated=true @@ -6,3 +240,5 @@ output/schema/import-namespace-graph-compact.json linguist-generated=true output/schema/import-namespace-graph-expanded.json linguist-generated=true output/schema/validation-errors.json linguist-generated=true output/typescript/types.ts linguist-generated=true + +####################################################################################################