-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Execute Algorithm ML API. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com> * Changed version in test execute API. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com> * Change execute test version. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com> * Add execute schema property. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com> --------- Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
- Loading branch information
1 parent
b9dcb25
commit 5644cab
Showing
4 changed files
with
226 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
$schema: ../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test the execution of algorithms. | ||
version: '>= 2.19' | ||
prologues: | ||
- path: /_cluster/settings | ||
method: PUT | ||
request: | ||
payload: | ||
persistent: | ||
plugins.ml_commons.only_run_on_ml_node: false | ||
- path: /{index} | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
timestamp: | ||
type: date | ||
attribute: | ||
type: keyword | ||
value: | ||
type: float | ||
parameters: | ||
index: test-index | ||
epilogues: | ||
- path: /{index} | ||
method: DELETE | ||
status: [200, 404] | ||
parameters: | ||
index: test-index | ||
chapters: | ||
- synopsis: Execute local sample calculator algorithm. | ||
path: /_plugins/_ml/_execute/{algorithm_name} | ||
method: POST | ||
parameters: | ||
algorithm_name: local_sample_calculator | ||
request: | ||
payload: | ||
operation: max | ||
input_data: | ||
- 1 | ||
- 2 | ||
- 3 | ||
response: | ||
status: 200 | ||
- synopsis: Execute anomaly localization algorithm. | ||
path: /_plugins/_ml/_execute/{algorithm_name} | ||
method: POST | ||
parameters: | ||
algorithm_name: anomaly_localization | ||
request: | ||
payload: | ||
index_name: test-index | ||
attribute_field_names: | ||
- attribute | ||
aggregations: | ||
- max: | ||
max: | ||
field: value | ||
time_field_name: timestamp | ||
start_time: 1620630000000 | ||
end_time: 1620975600000 | ||
min_time_interval: 86400000 | ||
num_outputs: 10 | ||
response: | ||
status: 200 |