Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Truong <[email protected]>
  • Loading branch information
nhtruong committed Aug 12, 2024
1 parent 788d0f4 commit 49eee04
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ components:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/ModelGroup'
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.register_model@200:
content:
application/json:
Expand All @@ -157,7 +157,7 @@ components:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/ModelGroup'
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.get_task@200:
content:
application/json:
Expand Down
9 changes: 5 additions & 4 deletions spec/schemas/ml._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ components:
properties:
model_id:
type: string
description: The model ID.
state:
task_id:
type: string
status:
type: string
description: The state.
enum:
- CANCELLED
- COMPLETED
Expand All @@ -124,6 +124,7 @@ components:
description: Task type.
enum:
- DEPLOY_MODEL
- REGISTER_MODEL
function_name:
type: string
worker_node:
Expand All @@ -139,4 +140,4 @@ components:
is_async:
type: boolean
required:
- state
- status
12 changes: 11 additions & 1 deletion tests/default/ml/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ prologues:
plugins:
ml_commons:
only_run_on_ml_node: false
- path: /_plugins/_ml/tasks/*
method: DELETE
chapters:
- synopsis: Create model.
id: create_model
Expand All @@ -26,6 +28,7 @@ chapters:
output:
task_id: payload.task_id
- synopsis: Wait for task.
id: register_model
path: /_plugins/_ml/tasks/{task_id}
method: GET
warnings:
Expand All @@ -36,6 +39,13 @@ chapters:
status: 200
payload:
state: COMPLETED
output:
model_id: payload.model_id
retry:
count: 3
count: 5
wait: 30000
- synopsis: Delete model.
path: /_plugins/_ml/models/{model_id}
parameters:
model_id: ${register_model.model_id}
method: DELETE

0 comments on commit 49eee04

Please sign in to comment.