Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version for ML Predict, Train APIs #763

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- 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))
- 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))
- 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))
- 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))

### Removed
- 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))
Expand Down
3 changes: 3 additions & 0 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ paths:
post:
operationId: ml.predict.0
x-operation-group: ml.predict
x-version-added: '1.3'
Tokesh marked this conversation as resolved.
Show resolved Hide resolved
description: Predicts new data with trained model.
parameters:
- $ref: '#/components/parameters/ml.predict::path.algorithm_name'
Expand All @@ -346,6 +347,7 @@ paths:
post:
operationId: ml.train.0
x-operation-group: ml.train
x-version-added: '1.3'
description: Trains a model synchronously.
parameters:
- $ref: '#/components/parameters/ml.train::path.algorithm_name'
Expand All @@ -358,6 +360,7 @@ paths:
post:
operationId: ml.train_predict.0
x-operation-group: ml.train_predict
x-version-added: '1.3'
description: Trains a model and predicts against the same training dataset.
parameters:
- $ref: '#/components/parameters/ml.train_predict::path.algorithm_name'
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ml/ml/predict.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test the prediction of new data with trained model.
version: '>= 1.3'
prologues:
- path: /_bulk
method: POST
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ml/ml/train.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test the training of a model synchronously.
version: '>= 1.3'
prologues:
- path: /_bulk
method: POST
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ml/ml/train_predict.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test training a model, then immediately predict against the same training dataset.
version: '>= 1.3'
prologues:
- path: /_bulk
method: POST
Expand Down
Loading