-
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
base: main
Are you sure you want to change the base?
Added ML Model APIs #733
Conversation
Changes AnalysisCommit SHA: 1e2619d API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12564099744/artifacts/2375148771 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 |
Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
…h the tests Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
…o models/search.yaml, resolved conflicts and updated CHANGELOG Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
…project#732) * Fixed /_search/scroll. Signed-off-by: dblock <dblock@amazon.com> * Added tests for GET and POST /_search. Signed-off-by: dblock <dblock@amazon.com> * Added a test for GET /_search/pipeline and DELETE /_search/pipeline/{id}. Signed-off-by: dblock <dblock@amazon.com> * Added missing _search/point_in_time tests. Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
* Added tests for /_validate/query. Signed-off-by: dblock <dblock@amazon.com> * Added retry for opensearch-project#738. Signed-off-by: dblock <dblock@amazon.com> --------- Signed-off-by: dblock <dblock@amazon.com> Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
37dfa5f
to
78cf49d
Compare
…ata. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <143617992+nathaliellenaa@users.noreply.github.com>
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.
…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 <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <143617992+nathaliellenaa@users.noreply.github.com>
…t for deprecated model metadata creation API. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
…pload to create_metadata.yaml, updated CHANGELOG. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
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.
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <143617992+nathaliellenaa@users.noreply.github.com>
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 |
* ignoring hyperlinks in descriptions for vale Signed-off-by: Tokesh <tokesh789@gmail.com> * hotfix linter Signed-off-by: Tokesh <tokesh789@gmail.com> * deleting not necessary sign to pass ci linter Signed-off-by: Tokesh <tokesh789@gmail.com> * added separate method and tests Signed-off-by: Tokesh <tokesh789@gmail.com> * added expect with contain Signed-off-by: Tokesh <tokesh789@gmail.com> * added tests and fixing code style Signed-off-by: Tokesh <tokesh789@gmail.com> * hotfix code style in keepdescriptions Signed-off-by: Tokesh <tokesh789@gmail.com> * chore: added spaces outside of regex match Signed-off-by: Tokesh <tokesh789@gmail.com> * chore: formatting code by linter Signed-off-by: Tokesh <tokesh789@gmail.com> --------- Signed-off-by: Tokesh <tokesh789@gmail.com>
* Update cat namespace descriptions Updates all cat namespace descriptions to add automation. Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Fix linting error Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Fix various errors. Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Fix remaining linting errors Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Update spec/namespaces/cat.yaml Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
Signed-off-by: Nathalie Jonathan <143617992+nathaliellenaa@users.noreply.github.com>
…cate map keys in ml._common.yaml, removed excluded parts and until property in the test files. Signed-off-by: Nathalie Jonathan <nathhjo@amazon.com>
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? |
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.