Skip to content

Commit

Permalink
Merge branch 'main' into ml-predict-train-version
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
  • Loading branch information
dblock authored Jan 3, 2025
2 parents ae0e794 + 89aeaa8 commit 5a22c2e
Show file tree
Hide file tree
Showing 5 changed files with 428 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added 404 response to `/_search/scroll` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))
- Added `node_failures` to `DELETE /_search/scroll` and `DELETE /_search/scroll/{scroll_id}` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))
- Added `POST /_plugins/_ml/_train/{algorithm_name}`, `_predict/{algorithm_name}/{model_id}`, and `_train_predict/{algorithm_name}` ([#755](https://github.com/opensearch-project/opensearch-api-specification/pull/755))
- Added `PUT /_plugins/_ml/model_groups/{model_group_id}`, `GET /_plugins/_ml/model_groups/_search`, and `POST /_plugins/_ml/model_groups/_search` ([#760](https://github.com/opensearch-project/opensearch-api-specification/pull/760))
- 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
Expand Down
106 changes: 101 additions & 5 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.get_model_group@200'
put:
operationId: ml.update_model_group.0
x-operation-group: ml.update_model_group
x-version-added: '2.9'
description: Updates a model group.
parameters:
- $ref: '#/components/parameters/ml.update_model_group::path.model_group_id'
requestBody:
$ref: '#/components/requestBodies/ml.update_model_group'
responses:
'200':
$ref: '#/components/responses/ml.update_model_group@200'
delete:
operationId: ml.delete_model_group.0
x-operation-group: ml.delete_model_group
Expand All @@ -33,6 +45,27 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.delete_model_group@200'
/_plugins/_ml/model_groups/_search:
get:
operationId: ml.search_model_group.0
x-operation-group: ml.search_model_group
x-version-added: '2.9'
description: Searches for model groups.
requestBody:
$ref: '#/components/requestBodies/ml.search_model_group'
responses:
'200':
$ref: '#/components/responses/ml.search_model_group@200'
post:
operationId: ml.search_model_group.1
x-operation-group: ml.search_model_group
x-version-added: '2.9'
description: Searches for model groups.
requestBody:
$ref: '#/components/requestBodies/ml.search_model_group'
responses:
'200':
$ref: '#/components/responses/ml.search_model_group@200'
/_plugins/_ml/models/_register:
post:
operationId: ml.register_model.0
Expand Down Expand Up @@ -210,6 +243,51 @@ components:
description: The add all backend roles.
required:
- name
ml.update_model_group:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The model group name.
description:
type: string
description: The model group description.
add_all_backend_roles:
type: boolean
description: Whether to include all backend roles.
model_access_name:
type: string
description: The model access name
backend_roles:
type: array
items:
type: string
description: The backend roles.
add_backend_roles:
type: array
items:
type: string
description: The backend roles to add.
ml.search_model_group:
content:
application/json:
schema:
type: object
properties:
query:
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int64
description: The number of model groups to return.
sort:
type: array
items:
$ref: '../schemas/ml._common.yaml#/components/schemas/Sort'
description: The sort order.
ml.register_model:
content:
application/json:
Expand Down Expand Up @@ -244,14 +322,16 @@ components:
properties:
query:
type: object
# TODO: Define the query schema
description: The query.
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int64
description: The number of models to return.
required:
- query
- size
sort:
type: array
items:
$ref: '../schemas/ml._common.yaml#/components/schemas/Sort'
description: The sort order.
ml.predict:
content:
application/json:
Expand Down Expand Up @@ -380,6 +460,16 @@ components:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/ModelGroup'
ml.update_model_group@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/UpdateModelGroupResponse'
ml.search_model_group@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/SearchModelGroupsResponse'
ml.delete_model_group@200:
content:
application/json:
Expand Down Expand Up @@ -486,6 +576,12 @@ components:
required: true
schema:
type: string
ml.update_model_group::path.model_group_id:
name: model_group_id
in: path
required: true
schema:
type: string
ml.delete_model_group::path.model_group_id:
name: model_group_id
in: path
Expand Down
Loading

0 comments on commit 5a22c2e

Please sign in to comment.