Skip to content

Commit d10df56

Browse files
committed
Updates trained model tests
Infer trained model works on Serverless as long as we use the latest URL: `/_ml/trained_models/{model_id}/deployment/_infer` is deprecated. Use `/_ml/trained_models/{model_id}/_infer instead` This adds a test for the API in Serverless.
1 parent c0db00c commit d10df56

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/machine_learning/20_trained_model.yml tests/machine_learning/20_trained_model_serverless.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
requires:
33
serverless: true
4-
stack: true
4+
stack: false
55
---
66
teardown:
77
- do:
@@ -63,6 +63,17 @@ teardown:
6363
}
6464
- match: { assignment.task_parameters.model_id: test_model }
6565
- match: { assignment.task_parameters.number_of_allocations: 1 }
66+
- do:
67+
ml.infer_trained_model:
68+
model_id: "test_model"
69+
body: >
70+
{
71+
"docs": [
72+
{ "input": "words" }
73+
]
74+
}
75+
- is_true: inference_results
76+
6677
- do:
6778
ml.stop_trained_model_deployment:
6879
model_id: test_model

0 commit comments

Comments
 (0)