Skip to content

Commit

Permalink
Added ML Model APIs (#733)
Browse files Browse the repository at this point in the history
* Added ML Model APIs (get, search, update model) to the spec along with the tests

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added ML Model APIs (undeploy, unload), moved test for search model to models/search.yaml, resolved conflicts and updated CHANGELOG

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added support for using a certificate and key. (#731)

Signed-off-by: dblock <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>

* Fixed /_search/scroll/{scroll_id}, missing search tests. (#732)

* Fixed /_search/scroll.

Signed-off-by: dblock <[email protected]>

* Added tests for GET and POST /_search.

Signed-off-by: dblock <[email protected]>

* Added a test for GET /_search/pipeline and DELETE /_search/pipeline/{id}.

Signed-off-by: dblock <[email protected]>

* Added missing _search/point_in_time tests.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>

* Added tests for /_validate/query. (#739)

* Added tests for /_validate/query.

Signed-off-by: dblock <[email protected]>

* Added retry for #738.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>

* Fixed lint and directory path error.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added ML Model APIs (load, upload, create metadata).

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added ML Model APIs (predict) and updated the test settings for metadata.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Fixed lint errors in predict.yaml, moved setup to prologues and teardown to epilogues in predict.yaml and load.yaml, updated CHANGELOG format, updated API description, 'model_group_id' ID type, 'version' parameter, and made 'model_format' a type of its own in ml.yaml.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added ML Model APIs (chunk, register meta), updated CHANGELOG and test for deprecated model metadata creation API.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Added ML Model APIs (upload chunk), moved test for deprecated chunk upload to create_metadata.yaml, updated CHANGELOG.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Applied suggestions from code review.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Merged main and resolve conflicts.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Moved test models folder to tests/plugins/ml/ml/models, removed duplicate map keys in ml._common.yaml, removed excluded parts and until property in the test files.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Fixed merge conflicts, added support for payload properties into the prologue, attempted to fix errors in predict.yaml.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Rebase with main, fixed test-spec.yml content, added response property in prologues of predict.yaml, undeploy.yaml, unload.yaml, added version for ML Model APIs.

Signed-off-by: Nathalie Jonathan <[email protected]>

* Modified response payload state from RUNNING to COMPLETED.

Signed-off-by: Nathalie Jonathan <[email protected]>

---------

Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: dblock <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
  • Loading branch information
nathaliellenaa and dblock authored Jan 9, 2025
1 parent 32ce2fe commit c1651ec
Show file tree
Hide file tree
Showing 19 changed files with 1,386 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ jobs:
if: github.event_name == 'pull_request'
with:
name: pr-comment
path: pr-comment.json
path: pr-comment.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `aggs` property as an alias to `aggregations` in requestBody of `search` [#774](https://github.com/opensearch-project/opensearch-api-specification/issues/774)
- Added `POST /_plugins/_ml/memory`, `POST /_plugins/_ml/memory/_search`, `{memory_id}/_search`, `{memory_id}/messages`, `PUT /_plugins/_ml/memory/{memory_id}`, `message/{message_id}`, `GET /_plugins/_ml/memory`, `GET /_plugins/_ml/memory/{memory_id}`, `_search`, `message/{message_id}`, `{memory_id}/messages`, `{memory_id}/_search`, `message/{message_id}/traces`, and `DELETE /_plugins/_ml/memory/{memory_id}` ([#771](https://github.com/opensearch-project/opensearch-api-specification/pull/771))
- Added support for evaluating response payloads in prologues and epilogues ([#772](https://github.com/opensearch-project/opensearch-api-specification/pull/772))
- Added `GET /_plugins/_ml/models/{model_id}`, `POST /_plugins/_ml/models/_search`, `POST /_plugins/_ml/models/_unload`, `_undeploy`, `_upload`, `meta`, `_register_meta`, `POST /_plugins/_ml/models/{model_id}/_load`, `_predict`, `_unload`, `chunk/{chunk_number}`, `upload_chunk/{chunk_number}`, and `PUT /_plugins/_ml/models/{model_id}` ([#733](https://github.com/opensearch-project/opensearch-api-specification/pull/733))

### 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
2 changes: 2 additions & 0 deletions json_schemas/test_story.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ definitions:
$ref: '#/definitions/Distributions'
retry:
$ref: '#/definitions/Retry'
response:
$ref: '#/definitions/ExpectedResponse'
required: [method, path]

Output:
Expand Down
Loading

0 comments on commit c1651ec

Please sign in to comment.