-
Notifications
You must be signed in to change notification settings - Fork 62
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
Added ML Model APIs #733
Added ML Model APIs #733
Conversation
Changes AnalysisCommit SHA: 7fa9b34 API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12698226238/artifacts/2409613270 API Coverage
|
Spec Test Coverage Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. I have some smallish nits. Iterate to green (validation is failing, etc.)
Btw, there's a whole bunch of others missing per #168. They don't all need to be done at the same time. |
Yes, I'm planning to create some small PRs based on the APIs category (model, model groups, connector, agents, etc.) I will also add more missing Model APIs to this PR. |
DCO is missing @nathaliellenaa |
37dfa5f
to
78cf49d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Some nits below.
In tests try to get rid of multiple-paths-detected: false
as much as possible by moving setup into prologues
and teardown into epilogues
. You should only need that set if there's a need to call an unrelated API (e.g. wait on a task) to complete the test. Otherwise chapters
should only have chapters for the API being tested.
The APIs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work.
Go through tests and make sure only the API being tested is in the chapters
and everything else is in prologues
or epilogues
, and that the naming is consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tests fail consistently in CI, https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12520890851/job/34927206366?pr=733, maybe needs longer retries or maybe there's a real problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent tests/plugins/ml/models
should be tests/plugins/ml/ml/models
. I know the double ml
looks weird there, but the folder ml
is the name of the test suite (like default
) and from there the path is the API path, and all the APIs being tested are under _ml/models
.
The tests passed when Update: It seems that when the deploy task state is still CREATED, it immediately predicts the model without retrying it until the state is RUNNING or COMPLETED. I suspected that it's possibly picking up the state from registering a model previously, but I already verified that @dblock Do you have any idea what causes this issue?
|
I don't believe
Retry schema is here. You want to wait till the response payload is COMPLETED, so:
Then
There's a bug in the schema, it should have prevented you from adding |
I checked the error and it still has the same issue on the |
I think the right fix would be to add support for payload properties into the prologue. Want to give it a shot? |
Sure, I'll try this approach. Update: I added the response payload properties into the prologue, but same issue still persists. |
Add that code here, I can try to help. Also since #767 we have logs from CI so it might be helpful to look at those. |
1e2619d
to
9c72a0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were not actually checking prologues and epilogues payloads, implemented in #772.
@nathaliellenaa #772 was merged, rebase? |
…h the tests Signed-off-by: Nathalie Jonathan <[email protected]>
…o models/search.yaml, resolved conflicts and updated CHANGELOG Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: dblock <[email protected]> Signed-off-by: Nathalie Jonathan <[email protected]>
…project#732) * Fixed /_search/scroll. Signed-off-by: dblock <[email protected]> * Added tests for GET and POST /_search. Signed-off-by: dblock <[email protected]> * Added a test for GET /_search/pipeline and DELETE /_search/pipeline/{id}. Signed-off-by: dblock <[email protected]> * Added missing _search/point_in_time tests. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]> Signed-off-by: Nathalie Jonathan <[email protected]>
* Added tests for /_validate/query. Signed-off-by: dblock <[email protected]> * Added retry for opensearch-project#738. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]> Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>
…ata. Signed-off-by: Nathalie Jonathan <[email protected]>
…own to epilogues in predict.yaml and load.yaml, updated CHANGELOG format, updated API description, 'model_group_id' ID type, 'version' parameter, and made 'model_format' a type of its own in ml.yaml. Signed-off-by: Nathalie Jonathan <[email protected]>
…t for deprecated model metadata creation API. Signed-off-by: Nathalie Jonathan <[email protected]>
…pload to create_metadata.yaml, updated CHANGELOG. Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>
…cate map keys in ml._common.yaml, removed excluded parts and until property in the test files. Signed-off-by: Nathalie Jonathan <[email protected]>
…prologue, attempted to fix errors in predict.yaml. Signed-off-by: Nathalie Jonathan <[email protected]>
…y in prologues of predict.yaml, undeploy.yaml, unload.yaml, added version for ML Model APIs. Signed-off-by: Nathalie Jonathan <[email protected]>
9c72a0d
to
5d536df
Compare
Signed-off-by: Nathalie Jonathan <[email protected]>
Looks like at least 1 flaky test: #776 |
Description
Added missing ML Model APIs.
Issues Resolved
Part of opensearch-project/opensearch-py#867.
ML Model APIs to add
GET /_plugins/_ml/models/{model_id}
POST /_plugins/_ml/models/meta
POST /_plugins/_ml/models/_register_meta
POST /_plugins/_ml/models/_search
POST /_plugins/_ml/models/_undeploy
POST /_plugins/_ml/models/_unload
POST /_plugins/_ml/models/{model_id}/_unload
POST /_plugins/_ml/models/_upload
POST /_plugins/_ml/models/{model_id}/_load
POST /_plugins/_ml/models/{model_id}/_predict
POST /_plugins/_ml/models/{model_id}/chunk/{chunk_number}
POST /_plugins/_ml/models/{model_id}/upload_chunk/{chunk_number}
PUT /_plugins/_ml/models/{model_id}
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.