Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests in ML Model APIs #782

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed ingest API schemas ([#766](https://github.com/opensearch-project/opensearch-api-specification/pull/766))
- Fixed CAT API schemas ([#769](https://github.com/opensearch-project/opensearch-api-specification/pull/769))
- Fixed core API schemas ([#777](https://github.com/opensearch-project/opensearch-api-specification/pull/777))
- Fixed Memory Circuit Breaker flaky test in ML Model APIs ([#782](https://github.com/opensearch-project/opensearch-api-specification/pull/782))

### Changed
- Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683))
Expand Down
6 changes: 6 additions & 0 deletions tests/plugins/ml/ml/models/load.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml

description: Test the deployment of a model using deprecated load API.
prologues:
- path: /_cluster/settings
method: PUT
request:
payload:
persistent:
plugins.ml_commons.native_memory_threshold: 100
- path: /_plugins/_ml/models/_register
id: register_model
method: POST
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/ml/ml/models/predict.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prologues:
persistent:
plugins.ml_commons.only_run_on_ml_node: false
plugins.ml_commons.model_access_control_enabled: true
plugins.ml_commons.native_memory_threshold: 99
plugins.ml_commons.native_memory_threshold: 100
- path: /_plugins/_ml/model_groups/_register
id: create_model_group
method: POST
Expand Down
6 changes: 6 additions & 0 deletions tests/plugins/ml/ml/models/search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ $schema: ../../../../../json_schemas/test_story.schema.yaml
description: Test the search of models.
version: '>= 2.7'
prologues:
- path: /_cluster/settings
method: PUT
request:
payload:
persistent:
plugins.ml_commons.native_memory_threshold: 100
- path: /_plugins/_ml/models/_register
id: register_model
method: POST
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ml/ml/models/undeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ prologues:
payload:
persistent:
plugins.ml_commons.allow_custom_deployment_plan: true
plugins.ml_commons.native_memory_threshold: 100
- path: /_plugins/_ml/models/_register
id: register_model
method: POST
Expand Down
1 change: 1 addition & 0 deletions tests/plugins/ml/ml/models/unload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ prologues:
payload:
persistent:
plugins.ml_commons.allow_custom_deployment_plan: true
plugins.ml_commons.native_memory_threshold: 100
- path: /_plugins/_ml/models/_register
id: register_model
method: POST
Expand Down
11 changes: 11 additions & 0 deletions tests/plugins/ml/ml/models/upload.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
$schema: ../../../../../json_schemas/test_story.schema.yaml

description: Test the creation of models using upload API (deprecated).
prologues:
- path: /_cluster/settings
method: PUT
request:
payload:
persistent:
plugins.ml_commons.native_memory_threshold: 100
epilogues:
- path: /_plugins/_ml/tasks/{task_id}
id: get_completed_task
Expand All @@ -10,6 +17,10 @@ epilogues:
retry:
count: 3
wait: 10000
response:
status: 200
payload:
state: COMPLETED
output:
model_id: payload.model_id
- path: /_plugins/_ml/models/{model_id}
Expand Down
Loading