-
Notifications
You must be signed in to change notification settings - Fork 138
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
Conversation
Signed-off-by: Bhavana Ramaram <[email protected]>
plugin/src/main/java/org/opensearch/ml/rest/RestMLPredictionAction.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/settings/MLFeatureEnabledSetting.java
Outdated
Show resolved
Hide resolved
The field name Therefore, names like However, I realize these suggestions might not align perfectly with the existing remote_model_inference_enabled field. |
plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Bhavana Ramaram <[email protected]>
363429b
to
e1a81e4
Compare
@@ -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); |
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.
just wondering if we should throw IllegalStateException
or Forbidden exception?
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.
We can maybe use the same one as remote inference and agent framework to stay consistent?
plugin/src/main/java/org/opensearch/ml/utils/MLExceptionUtils.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Bhavana Ramaram <[email protected]>
343e946
to
8924e22
Compare
add local model enabling setting Signed-off-by: Bhavana Ramaram <[email protected]> (cherry picked from commit b27673b)
add local model enabling setting Signed-off-by: Bhavana Ramaram <[email protected]> (cherry picked from commit b27673b)
add local model enabling setting Signed-off-by: Bhavana Ramaram <[email protected]> (cherry picked from commit b27673b) Co-authored-by: Bhavana Ramaram <[email protected]>
add local model enabling setting Signed-off-by: Bhavana Ramaram <[email protected]> (cherry picked from commit b27673b) Co-authored-by: Bhavana Ramaram <[email protected]>
Description
add a setting to enable/disable local model inference
Issues Resolved
#2164
Check List
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.