Skip to content

Commit 9e75335

Browse files
Added version for train, predict, train and predict ML APIs. (#763)
Signed-off-by: Nathalie Jonathan <[email protected]>
1 parent d8e4583 commit 9e75335

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
5454
- Added `GET`, `POST /_plugins/_ml/tasks/_search`, `GET /_plugins/_ml/tools`, `tools/{tool_name}` ([#797](https://github.com/opensearch-project/opensearch-api-specification/pull/797))
5555
- Added `POST /_plugins/_ml/agents/{agent_id}/_execute`, `GET /_plugins/_ml/agents/{agent_id}`, `GET`, `POST /_plugins/_ml/agents/_search` ([#798](https://github.com/opensearch-project/opensearch-api-specification/pull/798))
5656
- Added a warning for test file names that don't match the API being tested ([#793](https://github.com/opensearch-project/opensearch-api-specification/pull/793))
57+
- Added version for `POST /_plugins/_ml/_train/{algorithm_name}`, `_predict/{algorithm_name}/{model_id}`, and `_train_predict/{algorithm_name}` ([#763](https://github.com/opensearch-project/opensearch-api-specification/pull/763))
5758

5859
### Removed
5960
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))

spec/namespaces/ml.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ paths:
333333
post:
334334
operationId: ml.predict.0
335335
x-operation-group: ml.predict
336+
x-version-added: '1.3'
336337
description: Predicts new data with trained model.
337338
parameters:
338339
- $ref: '#/components/parameters/ml.predict::path.algorithm_name'
@@ -346,6 +347,7 @@ paths:
346347
post:
347348
operationId: ml.train.0
348349
x-operation-group: ml.train
350+
x-version-added: '1.3'
349351
description: Trains a model synchronously.
350352
parameters:
351353
- $ref: '#/components/parameters/ml.train::path.algorithm_name'
@@ -358,6 +360,7 @@ paths:
358360
post:
359361
operationId: ml.train_predict.0
360362
x-operation-group: ml.train_predict
363+
x-version-added: '1.3'
361364
description: Trains a model and predicts against the same training dataset.
362365
parameters:
363366
- $ref: '#/components/parameters/ml.train_predict::path.algorithm_name'

tests/plugins/ml/ml/predict.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$schema: ../../../../json_schemas/test_story.schema.yaml
22

33
description: Test the prediction of new data with trained model.
4+
version: '>= 1.3'
45
prologues:
56
- path: /_bulk
67
method: POST

tests/plugins/ml/ml/train.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$schema: ../../../../json_schemas/test_story.schema.yaml
22

33
description: Test the training of a model synchronously.
4+
version: '>= 1.3'
45
prologues:
56
- path: /_bulk
67
method: POST

tests/plugins/ml/ml/train_predict.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
$schema: ../../../../json_schemas/test_story.schema.yaml
22

33
description: Test training a model, then immediately predict against the same training dataset.
4+
version: '>= 1.3'
45
prologues:
56
- path: /_bulk
67
method: POST

0 commit comments

Comments
 (0)