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 local inference enabling/disabling setting #2232

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

rbhavna
Copy link
Collaborator

@rbhavna rbhavna commented Mar 19, 2024

Description

add a setting to enable/disable local model inference

Issues Resolved

#2164

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.

@dhrubo-os
Copy link
Collaborator

dhrubo-os commented Mar 19, 2024

The field namelocal_model_inference_enabled doesn't seem quite right to me because it suggests that only prediction is being managed. In reality, we are also controlling model registration and deployment.

Therefore, names like local_model_management_enabled, local_model_lifecycle_enabled, or local_model_services_enabled seem more appropriate for the operations we want to handle.

However, I realize these suggestions might not align perfectly with the existing remote_model_inference_enabled field.

@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:51 — with GitHub Actions Error
Signed-off-by: Bhavana Ramaram <[email protected]>
@rbhavna rbhavna force-pushed the local_model_setting branch from 363429b to e1a81e4 Compare March 19, 2024 23:53
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:53 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:53 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:53 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 19, 2024 23:53 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:14 — with GitHub Actions Error
@@ -144,7 +144,7 @@ protected void doExecute(Task task, ActionRequest request, ActionListener<MLDepl
Boolean isHidden = mlModel.getIsHidden();
if (functionName == FunctionName.REMOTE && !mlFeatureEnabledSetting.isRemoteInferenceEnabled()) {
throw new IllegalStateException(REMOTE_INFERENCE_DISABLED_ERR_MSG);
} else if (FunctionName.isDLModel(functionName) && !mlFeatureEnabledSetting.isLocalModelInferenceEnabled()) {
} else if (FunctionName.isDLModel(functionName) && !mlFeatureEnabledSetting.isLocalModelEnabled()) {
throw new IllegalStateException(LOCAL_MODEL_DISABLED_ERR_MSG);
Copy link
Collaborator

Choose a reason for hiding this comment

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

just wondering if we should throw IllegalStateException or Forbidden exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can maybe use the same one as remote inference and agent framework to stay consistent?

@rbhavna rbhavna force-pushed the local_model_setting branch from 343e946 to 8924e22 Compare March 20, 2024 00:29
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Failure
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Error
@rbhavna rbhavna had a problem deploying to ml-commons-cicd-env March 20, 2024 00:29 — with GitHub Actions Failure
@rbhavna rbhavna merged commit b27673b into opensearch-project:main Mar 20, 2024
4 of 10 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 20, 2024
add local model enabling setting

Signed-off-by: Bhavana Ramaram <[email protected]>
(cherry picked from commit b27673b)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 20, 2024
add local model enabling setting

Signed-off-by: Bhavana Ramaram <[email protected]>
(cherry picked from commit b27673b)
rbhavna added a commit that referenced this pull request Mar 20, 2024
add local model enabling setting

Signed-off-by: Bhavana Ramaram <[email protected]>
(cherry picked from commit b27673b)

Co-authored-by: Bhavana Ramaram <[email protected]>
rbhavna added a commit that referenced this pull request Mar 20, 2024
add local model enabling setting

Signed-off-by: Bhavana Ramaram <[email protected]>
(cherry picked from commit b27673b)

Co-authored-by: Bhavana Ramaram <[email protected]>
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.

3 participants