-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ML Model APIs (undeploy, unload), moved test for search model t…
…o models/search.yaml, resolved conflicts and updated CHANGELOG Signed-off-by: Nathalie Jonathan <[email protected]>
- Loading branch information
1 parent
1420d16
commit 0cc17c2
Showing
8 changed files
with
357 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test the search of models. | ||
distributions: | ||
excluded: | ||
- amazon-managed | ||
- amazon-serverless | ||
version: '>= 2.11' | ||
prologues: | ||
- path: /_plugins/_ml/models/_register | ||
id: register_model | ||
method: POST | ||
request: | ||
payload: | ||
name: huggingface/sentence-transformers/msmarco-distilbert-base-tas-b | ||
version: 1.0.1 | ||
model_format: TORCH_SCRIPT | ||
output: | ||
task_id: payload.task_id | ||
chapters: | ||
- synopsis: Search model. | ||
path: /_plugins/_ml/models/_search | ||
method: POST | ||
request: | ||
payload: | ||
query: | ||
match_all: {} | ||
size: 1000 | ||
response: | ||
status: 200 | ||
payload: | ||
hits: | ||
hits: | ||
- _score: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test the undeployment of specific models from specific nodes. | ||
distributions: | ||
excluded: | ||
- amazon-managed | ||
- amazon-serverless | ||
version: '>= 2.11' | ||
warnings: | ||
multiple-paths-detected: false | ||
prologues: | ||
- path: /_plugins/_ml/models/_register | ||
id: register_model | ||
method: POST | ||
request: | ||
payload: | ||
name: huggingface/sentence-transformers/msmarco-distilbert-base-tas-b | ||
version: 1.0.1 | ||
model_format: TORCH_SCRIPT | ||
output: | ||
task_id: payload.task_id | ||
epilogues: | ||
- path: /_plugins/_ml/models/{model_id} | ||
parameters: | ||
model_id: ${get_completed_register_model_task.model_id} | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Wait to get completed task. | ||
id: get_completed_register_model_task | ||
path: /_plugins/_ml/tasks/{task_id} | ||
method: GET | ||
parameters: | ||
task_id: ${register_model.task_id} | ||
response: | ||
status: 200 | ||
payload: | ||
state: COMPLETED | ||
output: | ||
model_id: payload.model_id | ||
retry: | ||
count: 3 | ||
wait: 10000 | ||
- synopsis: Deploy a model. | ||
id: deploy_model | ||
path: /_plugins/_ml/models/{model_id}/_deploy | ||
method: POST | ||
parameters: | ||
model_id: ${get_completed_register_model_task.model_id} | ||
output: | ||
task_id: payload.task_id | ||
response: | ||
status: 200 | ||
- synopsis: Wait to get completed task. | ||
id: get_completed_deploy_model_task | ||
path: /_plugins/_ml/tasks/{task_id} | ||
method: GET | ||
parameters: | ||
task_id: ${deploy_model.task_id} | ||
response: | ||
status: 200 | ||
payload: | ||
state: COMPLETED | ||
output: | ||
model_id: payload.model_id | ||
retry: | ||
count: 3 | ||
wait: 10000 | ||
- synopsis: Undeploy a model. | ||
path: /_plugins/_ml/models/_undeploy | ||
method: POST | ||
request: | ||
payload: | ||
model_ids: | ||
- ${get_completed_register_model_task.model_id} | ||
response: | ||
status: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test the unload (deprecated) of a model from all ML nodes. | ||
distributions: | ||
excluded: | ||
- amazon-managed | ||
- amazon-serverless | ||
warnings: | ||
multiple-paths-detected: false | ||
prologues: | ||
- path: /_plugins/_ml/models/_register | ||
id: register_model | ||
method: POST | ||
request: | ||
payload: | ||
name: huggingface/sentence-transformers/msmarco-distilbert-base-tas-b | ||
version: 1.0.1 | ||
model_format: TORCH_SCRIPT | ||
output: | ||
task_id: payload.task_id | ||
epilogues: | ||
- path: /_plugins/_ml/models/{model_id} | ||
parameters: | ||
model_id: ${get_completed_register_model_task.model_id} | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Wait to get completed task. | ||
id: get_completed_register_model_task | ||
path: /_plugins/_ml/tasks/{task_id} | ||
method: GET | ||
parameters: | ||
task_id: ${register_model.task_id} | ||
response: | ||
status: 200 | ||
payload: | ||
state: COMPLETED | ||
output: | ||
model_id: payload.model_id | ||
retry: | ||
count: 3 | ||
wait: 10000 | ||
- synopsis: Deploy a model. | ||
id: deploy_model | ||
path: /_plugins/_ml/models/{model_id}/_deploy | ||
method: POST | ||
parameters: | ||
model_id: ${get_completed_register_model_task.model_id} | ||
output: | ||
task_id: payload.task_id | ||
response: | ||
status: 200 | ||
- synopsis: Wait to get completed task. | ||
id: get_completed_deploy_model_task | ||
path: /_plugins/_ml/tasks/{task_id} | ||
method: GET | ||
parameters: | ||
task_id: ${deploy_model.task_id} | ||
response: | ||
status: 200 | ||
payload: | ||
state: COMPLETED | ||
output: | ||
model_id: payload.model_id | ||
retry: | ||
count: 3 | ||
wait: 10000 | ||
- synopsis: Unload a model. | ||
path: /_plugins/_ml/models/{model_id}/_unload | ||
method: POST | ||
parameters: | ||
model_id: ${get_completed_register_model_task.model_id} | ||
response: | ||
status: 200 |
Oops, something went wrong.