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 doc for update model interface #9213

Merged

Conversation

mingshl
Copy link
Contributor

@mingshl mingshl commented Feb 15, 2025

Description

this doc shows how to update model interface for a model.
related PR #7830

Issues Resolved

#9203

Version

OS 2.16

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@kkhatua
Copy link
Member

kkhatua commented Feb 17, 2025

@mingshl is the label marked accidentally as 2.16 instead of 2.19?

kolchfa-aws and others added 2 commits February 18, 2025 09:56
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
@kolchfa-aws
Copy link
Collaborator

@mingshl This is for all versions 2.16 and above, correct? I am adding a backport to the latest version (2.19) because we support only the latest version of the documentation.

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

LGTM!

@kolchfa-aws kolchfa-aws merged commit e9229d8 into opensearch-project:main Feb 18, 2025
7 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 18, 2025
* add doc for update model interface

Signed-off-by: Mingshi Liu <mingshl@amazon.com>

* Doc review

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

---------

Signed-off-by: Mingshi Liu <mingshl@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Co-authored-by: Fanit Kolchina <kolchfa@amazon.com>
Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
(cherry picked from commit e9229d8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@@ -130,3 +130,53 @@ PUT /_plugins/_ml/models/9uGdCJABjaMXYrp14YRj
}
```

#### Example request: Updating the model interface

You can update a model's interface to define input and output schemas. This is useful for models that lack a default interface or require customization.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in here addressed in f291cf0

```json
PUT /_plugins/_ml/models/IMcNB5UB7judm8f45nXo
{
"interface": {
Copy link
Contributor

Choose a reason for hiding this comment

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

When we register model we can use "interface": {} to set empty interface. Why can't we use same way when update model ?

POST _plugins/_ml/models/_register
{
  "name": "...",
  "function_name": "remote",
  "description": "test model",
  "connector_id": "...",
  "interface": {}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I link the model interface link from model registration in the above comment. Since this page is for update model, I think we better not circle back to register API. We should use the update model API as an example. Also, this is an example to show how to remove interface when it's no longer needed. I think the model is assumed registered already.

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

Successfully merging this pull request may close these issues.

5 participants