-
Notifications
You must be signed in to change notification settings - Fork 520
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
Add doc for update model interface #9213
Conversation
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
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. |
@mingshl is the label marked accidentally as 2.16 instead of 2.19? |
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
@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. |
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.
LGTM!
* 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. |
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.
Suggest user read more details from https://opensearch.org/docs/latest/ml-commons-plugin/api/model-apis/register-model/#the-interface-parameter
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.
addressed in here addressed in f291cf0
```json | ||
PUT /_plugins/_ml/models/IMcNB5UB7judm8f45nXo | ||
{ | ||
"interface": { |
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.
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": {}
}
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.
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.
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
For more information on following Developer Certificate of Origin and signing off your commits, please check here.