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 docs on skip_validating_missing_parameters in ml-commons connector #8118

Conversation

yuye-aws
Copy link
Member

@yuye-aws yuye-aws commented Aug 29, 2024

Description

Introduce connector parameter in skip_validating_missing_parameters.

Issues Resolved

Introduce connector parameter in skip_validating_missing_parameters Closes #8110

Version

Since OpenSearch 2.17

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.

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.

@kolchfa-aws kolchfa-aws added release-notes PR: Include this PR in the automated release notes v2.17.0 labels Aug 29, 2024
Signed-off-by: Fanit Kolchina <[email protected]>
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

Thank you, @yuye-aws! I think the table rows got a bit scrambled so I unscrambled them. Please verify that everything looks good now.

@kolchfa-aws kolchfa-aws added 5 - Editorial review PR: Editorial review in progress 6 - Done but waiting to merge PR: The work is done and ready to merge labels Aug 30, 2024
@yuye-aws
Copy link
Member Author

yuye-aws commented Sep 3, 2024

Thank you, @yuye-aws! I think the table rows got a bit scrambled so I unscrambled them. Please verify that everything looks good now.

The revision looks good. Just pushed 1 commit to make both parameter description the same. Can you check whether it looks good?

@kolchfa-aws
Copy link
Collaborator

@yuye-aws Looks good. Applying "Done but waiting to merge" label to put this in the 2.17 editorial queue starting 9/11. This PR will be merged before the release.

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.

@yuye-aws @kolchfa-aws Please see my comments and changes and let me know if you have any questions. Thanks!

_ml-commons-plugin/api/connector-apis/update-connector.md Outdated Show resolved Hide resolved
| `actions` | JSON array | Defines which actions can run within the connector. If you're an administrator creating a connection, add the [blueprint]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/blueprints/) for your desired connection. |
| `backend_roles` | JSON array | A list of OpenSearch backend roles. For more information about setting up backend roles, see [Assigning backend roles to users]({{site.url}}{{site.baseurl}}/ml-commons-plugin/model-access-control#assigning-backend-roles-to-users). |
| `access_mode` | String | Sets the access mode for the model, either `public`, `restricted`, or `private`. Default is `private`. For more information about `access_mode`, see [Model groups]({{site.url}}{{site.baseurl}}/ml-commons-plugin/model-access-control#model-groups). |
| `actions` | JSON array | Defines which actions can run within the connector. If you're an administrator creating a connection, add the [blueprint]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/blueprints/) for your desired connection. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is "creating a connection" necessary here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it clarifies the action you're taking.

_ml-commons-plugin/api/connector-apis/update-connector.md Outdated Show resolved Hide resolved
_ml-commons-plugin/remote-models/blueprints.md Outdated Show resolved Hide resolved
_ml-commons-plugin/remote-models/blueprints.md Outdated Show resolved Hide resolved
_ml-commons-plugin/remote-models/blueprints.md Outdated Show resolved Hide resolved
| `protocol` | String | Yes | The protocol for the connection. For AWS services such as Amazon SageMaker and Amazon Bedrock, use `aws_sigv4`. For all other services, use `http`. |
| `parameters` | JSON object | Yes | The default connector parameters, including `endpoint`, `model` and `skip_validating_missing_parameters`. Any parameters indicated in this field can be overridden by parameters specified in a predict request. |
| `credential` | JSON object | Yes | Defines any credential variables required to connect to your chosen endpoint. ML Commons uses **AES/GCM/NoPadding** symmetric encryption to encrypt your credentials. When the connection to the cluster first starts, OpenSearch creates a random 32-byte encryption key that persists in OpenSearch's system index. Therefore, you do not need to manually set the encryption key. |
| `actions` | JSON array | Yes | Defines what actions can run within the connector. If you're an administrator creating a connection, add the [blueprint]({{site.url}}{{site.baseurl}}/ml-commons-plugin/remote-models/blueprints/) for your desired connection. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Either "Defines which actions" or "Defines the actions that can". Is "creating a connection" necessary here?

_ml-commons-plugin/remote-models/blueprints.md Outdated Show resolved Hide resolved
_ml-commons-plugin/remote-models/blueprints.md Outdated Show resolved Hide resolved
| `request_body` | String | Required. Sets the parameters contained in the request body of the action. The parameters must include `\"inputText\`, which specifies how users of the connector should construct the request payload for the `action_type`. |
| `pre_process_function` | String | Optional. A built-in or custom Painless script used to preprocess the input data. OpenSearch provides the following built-in preprocess functions that you can call directly:<br> - `connector.pre_process.cohere.embedding` for [Cohere](https://cohere.com/) embedding models<br> - `connector.pre_process.openai.embedding` for [OpenAI](https://platform.openai.com/docs/guides/embeddings) embedding models <br> - `connector.pre_process.default.embedding`, which you can use to preprocess documents in neural search requests so that they are in the format that ML Commons can process with the default preprocessor (OpenSearch 2.11 or later). For more information, see [Built-in functions](#built-in-pre--and-post-processing-functions). |
| `post_process_function` | String | Optional. A built-in or custom Painless script used to post-process the model output data. OpenSearch provides the following built-in post-process functions that you can call directly:<br> - `connector.pre_process.cohere.embedding` for [Cohere text embedding models](https://docs.cohere.com/reference/embed)<br> - `connector.pre_process.openai.embedding` for [OpenAI text embedding models](https://platform.openai.com/docs/api-reference/embeddings) <br> - `connector.post_process.default.embedding`, which you can use to post-process documents in the model response so that they are in the format that neural search expects (OpenSearch 2.11 or later). For more information, see [Built-in functions](#built-in-pre--and-post-processing-functions). |

| `headers` | JSON object | Sets the headers used in the request or response body. Default is `ContentType: application/json`. If your third-party ML tool requires access control, define the required `credential` parameters in the `headers` parameter. |
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Sets" => "Defines" or "Specifies"? Define ML on first appearance if necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Already defined :)

@kolchfa-aws kolchfa-aws merged commit 39338d7 into opensearch-project:main Sep 11, 2024
5 checks passed
@yuye-aws yuye-aws deleted the skip_validating_missing_parameters branch September 12, 2024 02:20
epugh pushed a commit to o19s/documentation-website that referenced this pull request Sep 12, 2024
opensearch-project#8118)

* add doc: skip_validating_missing_parameters

Signed-off-by: yuye-aws <[email protected]>

* Doc review

Signed-off-by: Fanit Kolchina <[email protected]>

* update: make both description consistent

Signed-off-by: yuye-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Eric Pugh <[email protected]>
noahstaveley pushed a commit to noahstaveley/documentation-website that referenced this pull request Sep 23, 2024
opensearch-project#8118)

* add doc: skip_validating_missing_parameters

Signed-off-by: yuye-aws <[email protected]>

* Doc review

Signed-off-by: Fanit Kolchina <[email protected]>

* update: make both description consistent

Signed-off-by: yuye-aws <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Noah Staveley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Editorial review PR: Editorial review in progress 6 - Done but waiting to merge PR: The work is done and ready to merge release-notes PR: Include this PR in the automated release notes v2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Add Documentation on skip_validating_missing_parameters parameter in connector
3 participants