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 model input validation for local models in ml processor #2610

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

rbhavna
Copy link
Collaborator

@rbhavna rbhavna commented Jul 4, 2024

Description

add model input validation for local models in ml processor

Issues Resolved

(#2601)

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

// if model input is not provided for remote models, use default value
if (functionName.equalsIgnoreCase("remote")) {
modelInput = (modelInput != null) ? modelInput : "{ \"parameters\": ${ml_inference.parameters} }";
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it better to be a public static final string as DEFAULT_MODEl_INPUT_FIELD="{ "parameters": ${ml_inference.parameters} }"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

makes sense

@rbhavna rbhavna temporarily deployed to ml-commons-cicd-env July 5, 2024 19:19 — with GitHub Actions Inactive
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env July 5, 2024 19:19 — with GitHub Actions Failure
@rbhavna rbhavna temporarily deployed to ml-commons-cicd-env July 5, 2024 20:44 — with GitHub Actions Inactive
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env July 5, 2024 20:44 — with GitHub Actions Failure
Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
@rbhavna rbhavna temporarily deployed to ml-commons-cicd-env July 5, 2024 20:45 — with GitHub Actions Inactive
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env July 5, 2024 20:46 — with GitHub Actions Failure
@rbhavna rbhavna merged commit 2b953cd into opensearch-project:main Jul 5, 2024
7 of 8 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 5, 2024
* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 5, 2024
* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)
rbhavna added a commit that referenced this pull request Jul 6, 2024
…2614)

* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)

Co-authored-by: Bhavana Ramaram <rbhavna@amazon.com>
rbhavna added a commit that referenced this pull request Jul 6, 2024
…2615)

* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)

Co-authored-by: Bhavana Ramaram <rbhavna@amazon.com>
mingshl pushed a commit to mingshl/ml-commons that referenced this pull request Jul 8, 2024
…ch-project#2610)

* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
@b4sjoo b4sjoo added the v2.16.0 Issues targeting release v2.16.0 label Jul 26, 2024
opensearch-trigger-bot bot added a commit that referenced this pull request Oct 2, 2024
…2615)

* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)

Co-authored-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 6a250dd)
dhrubo-os pushed a commit that referenced this pull request Oct 2, 2024
…2615) (#3044)

* add model input validation for local models in ml processor

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>

---------

Signed-off-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 2b953cd)

Co-authored-by: Bhavana Ramaram <rbhavna@amazon.com>
(cherry picked from commit 6a250dd)

Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.15 v2.16.0 Issues targeting release v2.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants