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

Added ML Model APIs #733

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nathaliellenaa
Copy link
Contributor

@nathaliellenaa nathaliellenaa commented Dec 13, 2024

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/_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/meta
  • POST /_plugins/_ml/models/{model_id}/_load
  • POST /_plugins/_ml/models/{model_id}/_predict
  • POST /_plugins/_ml/models/{}/chunk/{}
  • POST /_plugins/_ml/models/{}/upload_chunk/{}
  • POST /_plugins/_ml/models/{}/{}/_register
  • POST /_plugins/_ml/models/{}/{}/_upload
  • 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.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

Changes Analysis

Commit SHA: 37dfa5f
Comparing To SHA: a631452

API Changes

Summary

├─┬Paths
│ ├──[➕] path (4802:3)
│ ├──[➕] path (4955:3)
│ ├──[➕] path (4935:3)
│ ├──[➕] path (4786:3)
│ ├──[➕] path (4900:3)
│ ├──[➕] path (4821:3)
│ ├─┬/_plugins/_ml/models/_register
│ │ └─┬POST
│ │   └─┬Requestbody
│ │     └─┬application/json
│ │       └─┬Schema
│ │         └──[➖] required (27139:17)❌ 
│ ├─┬/_plugins/_ml/models/{model_id}
│ │ ├──[➕] get (4856:7)
│ │ └──[➕] put (4870:7)
│ ├─┬/_plugins/_ml/models/{model_id}/_undeploy
│ │ └─┬POST
│ │   └──[➕] requestBody (27408:7)❌ 
│ └─┬/_plugins/_ml/models/_search
│   └──[➕] post (4772:7)
└─┬Components
  ├──[➕] requestBodies (27470:7)
  ├──[➕] requestBodies (27440:7)
  ├──[➕] requestBodies (27408:7)
  ├──[➕] requestBodies (27267:7)
  ├──[➕] requestBodies (27424:7)
  ├──[➕] responses (30611:7)
  ├──[➕] responses (30520:7)
  ├──[➕] responses (30454:7)
  ├──[➕] responses (30532:7)
  ├──[➕] responses (30599:7)
  ├──[➕] responses (30605:7)
  ├──[➕] parameters (23039:7)
  ├──[➕] parameters (23045:7)
  ├──[➕] parameters (23015:7)
  ├──[➕] parameters (23027:7)
  ├──[➕] schemas (54025:7)
  ├──[➕] schemas (54386:7)
  ├──[➕] schemas (54144:7)
  ├──[➕] schemas (54381:7)
  ├──[➕] schemas (54389:7)
  ├──[➕] schemas (53985:7)
  ├──[➕] schemas (54394:7)
  ├──[➕] schemas (53954:7)
  └─┬ml._common___Source
    └─┬model_state
      └──[➕] enum (54260:15)

Document Element Total Changes Breaking Changes
paths 11 2
components 24 0
  • BREAKING Changes: 2 out of 35
  • Removals: 1
  • Additions: 34
  • Breaking Removals: 1
  • Breaking Additions: 1

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12382747282/artifacts/2334771546

API Coverage

Before After Δ
Covered (%) 606 (59.35 %) 615 (60.24 %) 9 (0.89 %)
Uncovered (%) 415 (40.65 %) 406 (39.76 %) -9 (-0.89 %)
Unknown 43 43 0

Copy link
Contributor

github-actions bot commented Dec 13, 2024

Spec Test Coverage Analysis

Total Tested
542 520 (95.94 %)

Copy link
Member

@dblock dblock left a 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.)

CHANGELOG.md Outdated Show resolved Hide resolved
tests/plugins/ml/ml/models.yaml Outdated Show resolved Hide resolved
tests/plugins/ml/ml/models.yaml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@dblock
Copy link
Member

dblock commented Dec 13, 2024

Btw, there's a whole bunch of others missing per #168. They don't all need to be done at the same time.

Screenshot 2024-12-13 at 5 07 47 PM

@nathaliellenaa
Copy link
Contributor Author

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.

@nathaliellenaa nathaliellenaa changed the title Added missing ML Model APIs to the spec along with the tests Added ML Model APIs Dec 14, 2024
nathaliellenaa and others added 8 commits December 16, 2024 17:46
…o models/search.yaml, resolved conflicts and updated CHANGELOG

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]>
* 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]>
type: string
required:
- model_id
- status

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what status are we referring to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the status of creating the metadata. This is the reference.

@dhrubo-os
Copy link

DCO is missing @nathaliellenaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants