Skip to content

Commit

Permalink
Fix: model training intermittent test failure.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Oct 24, 2024
1 parent 54f0af9 commit acf7ee8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
6 changes: 5 additions & 1 deletion spec/namespaces/knn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,11 @@ components:
required: true
responses:
knn.delete_model@200: {}
knn.get_model@200: {}
knn.get_model@200:
content:
application/json:
schema:
type: object
knn.search_models@200: {}
knn.stats@200: {}
knn.train_model@200:
Expand Down
19 changes: 18 additions & 1 deletion tests/default/knn/train_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ prologues:
- {index: {_index: movies, _id: '9'}}
- {recommendation_vector: [9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5], duration: 8.9}
status: [200]
- method: POST
path: /_refresh
status: [200]
epilogues:
- path: /movies
method: DELETE
Expand Down Expand Up @@ -70,4 +73,18 @@ chapters:
response:
status: 200
output:
test_model_id: payload.model_id
test_model_id: payload.model_id
- synopsis: Wait for the model to get trained.
warnings:
multiple-paths-detected: false
method: GET
path: /_plugins/_knn/models/{model_id}
parameters:
model_id: ${train_model.test_model_id}
retry:
count: 3
response:
status: 200
payload:
model_id: ${train_model.test_model_id}
state: created

0 comments on commit acf7ee8

Please sign in to comment.