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

Add ML Model Group APIs #760

Merged

Conversation

nathaliellenaa
Copy link
Contributor

@nathaliellenaa nathaliellenaa commented Jan 2, 2025

Description

Added missing ML Model Group APIs.

Issues Resolved

Part of opensearch-project/opensearch-py#867.

ML Model Group APIs to add

  • PUT /_plugins/_ml/model_groups/{model_group_id}
  • GET /_plugins/_ml/model_groups/_search
  • POST /_plugins/_ml/model_groups/_search

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.

…response schema and query schema for search models and model groups.

Signed-off-by: Nathalie Jonathan <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Changes Analysis

Commit SHA: 23f1b72
Comparing To SHA: 24872ec

API Changes

Summary

├─┬Paths
│ ├──[➕] path (4768:3)
│ ├─┬/_plugins/_ml/models/_search
│ │ └─┬GET
│ │   └─┬Requestbody
│ │     └─┬application/json
│ │       └─┬Schema
│ │         ├──[➖] required (27309:17)❌ 
│ │         ├──[➖] required (27310:17)❌ 
│ │         ├──[➕] properties (27382:15)
│ │         ├─┬query
│ │         │ └──[🔀] $ref (54436:13)❌ 
│ │         └─┬size
│ │           └──[➕] format (27380:25)❌ 
│ └─┬/_plugins/_ml/model_groups/{model_group_id}
│   └──[➕] put (4831:7)
└─┬Components
  ├──[➕] requestBodies (27353:7)
  ├──[➕] requestBodies (27420:7)
  ├──[➕] responses (30537:7)
  ├──[➕] responses (30567:7)
  ├──[➕] parameters (23028:7)
  ├──[➖] schemas (54227:7)❌ 
  ├──[➖] schemas (54211:7)❌ 
  ├──[➕] schemas (54155:7)
  ├──[➕] schemas (54316:7)
  ├──[➕] schemas (54820:7)
  ├──[➕] schemas (54463:7)
  ├──[➕] schemas (54503:7)
  ├──[➕] schemas (54747:7)
  ├──[➕] schemas (54479:7)
  ├──[➕] schemas (54240:7)
  ├──[➕] schemas (54375:7)
  ├──[➕] schemas (54054:7)
  ├──[➕] schemas (54522:7)
  ├──[➕] schemas (54570:7)
  ├──[➕] schemas (54402:7)
  ├──[➕] schemas (54247:7)
  ├──[➕] schemas (54507:7)
  ├─┬ml._common___Filter
  │ ├──[➕] properties (54168:9)
  │ ├──[➕] properties (54174:9)
  │ ├──[➕] properties (54166:9)
  │ ├──[➕] properties (54170:9)
  │ └──[➕] properties (54172:9)
  ├─┬ml._common___SearchModelsResponse
  │ └──[🔀] $ref (54505:13)❌ 
  ├─┬ml._common___BoolQuery
  │ ├──[➕] properties (54089:9)
  │ ├──[➕] properties (54094:9)
  │ └──[➕] properties (54097:9)
  ├─┬ml._common___Source
  │ ├──[➕] properties (54684:9)
  │ ├──[➕] properties (54677:9)
  │ ├──[➕] properties (54691:9)
  │ ├──[➕] properties (54682:9)
  │ └─┬model_state
  │   └──[➕] enum (54620:15)
  ├─┬ml._common___Query
  │ ├──[➕] properties (54441:9)
  │ └──[➕] properties (54443:9)
  └─┬ml._common___ModelGroup
    ├──[➕] properties (54283:9)
    └─┬access
      ├──[➕] enum (54291:15)
      ├──[➕] enum (54289:15)
      └──[➕] enum (54290:15)

Document Element Total Changes Breaking Changes
paths 7 4
components 42 3
  • BREAKING Changes: 7 out of 49
  • Modifications: 2
  • Removals: 4
  • Additions: 43
  • Breaking Removals: 4
  • Breaking Modifications: 2
  • Breaking Additions: 1

Report

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

API Coverage

Before After Δ
Covered (%) 609 (59.65 %) 612 (59.94 %) 3 (0.29 %)
Uncovered (%) 412 (40.35 %) 409 (40.06 %) -3 (-0.29 %)
Unknown 43 43 0

Copy link
Contributor

github-actions bot commented Jan 2, 2025

Spec Test Coverage Analysis

Total Tested
542 542 (100 %)

Copy link
Collaborator

@Tokesh Tokesh left a comment

Choose a reason for hiding this comment

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

Great job!
Could you please check not only the specs from this PR but also the ML specs you added? We likely missed this, and it could cause issues in the future if someone tries to use these APIs from earlier versions.

tests/plugins/ml/ml/model_groups/search.yaml Outdated Show resolved Hide resolved
tests/plugins/ml/ml/model_groups/update.yaml Outdated Show resolved Hide resolved
@nathaliellenaa
Copy link
Contributor Author

Great job! Could you please check not only the specs from this PR but also the ML specs you added? We likely missed this, and it could cause issues in the future if someone tries to use these APIs from earlier versions.

Got it, I'll check about this. Since the PR for the train and predict API has been merged, should I create a new PR to update the version or should I make the changes in this PR?

@Tokesh
Copy link
Collaborator

Tokesh commented Jan 3, 2025

should I create a new PR to update the version or should I make the changes in this PR?

It depends on you; whichever is more comfortable for you :)

@nathaliellenaa
Copy link
Contributor Author

It depends on you; whichever is more comfortable for you :)

I'll create a new PR to avoid confusion, thank you!

@Tokesh
Copy link
Collaborator

Tokesh commented Jan 3, 2025

LGTM, Thank you very much! :)
But just in case, let someone else check, I don't have much experience with the ML plugin

@dblock
Copy link
Member

dblock commented Jan 3, 2025

But just in case, let someone else check, I don't have much experience with the ML plugin

I think @nathaliellenaa has more experience with the ML plugin by now than all of us :) Merging.

@dblock dblock merged commit 89aeaa8 into opensearch-project:main Jan 3, 2025
30 checks passed
@nathaliellenaa nathaliellenaa deleted the add-ml-model-group-api branch January 9, 2025 21:41
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