Skip to content

Commit

Permalink
Add missing scores parameter in MLPutTrainedModelVocabularyRequest (
Browse files Browse the repository at this point in the history
#2321) (#2323)

This adds the missing scores parameter that was introduced in v8.9.0.

[Docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/put-trained-model-vocabulary.html#ml-put-trained-model-vocabulary-request-body) say:

> (Optional, array) Vocabulary value scores used by sentence-piece tokenization. Must have the same length as vocabulary. Required for unigram sentence-piece tokenized models like XLMRoberta and T5.

(cherry picked from commit e279583)

Co-authored-by: David Olaru <[email protected]>
  • Loading branch information
github-actions[bot] and dolaru authored Oct 31, 2023
1 parent 3b09f9d commit 7111a05
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
24 changes: 23 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
import { double } from '@_types/Numeric'

/**
* Creates a trained model vocabulary.
Expand Down Expand Up @@ -48,5 +49,12 @@ export interface Request extends RequestBase {
* @availability serverless
*/
merges?: string[]

/**
* The optional vocabulary value scores if required by the tokenizer.
* @availability stack since=8.9.0
* @availability serverless
*/
scores?: double[]
}
}

0 comments on commit 7111a05

Please sign in to comment.