Skip to content

Commit bb5b636

Browse files
committed
add deploySetting in registering pretrained models (opensearch-project#2415)
Signed-off-by: Xun Zhang <xunzh@amazon.com>
1 parent 618678f commit bb5b636

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import org.opensearch.core.action.ActionListener;
2929
import org.opensearch.ml.common.FunctionName;
30+
import org.opensearch.ml.common.model.MLDeploySetting;
3031
import org.opensearch.ml.common.model.MLModelConfig;
3132
import org.opensearch.ml.common.model.MLModelFormat;
3233
import org.opensearch.ml.common.model.QuestionAnsweringModelConfig;
@@ -70,6 +71,7 @@ public void downloadPrebuiltModelConfig(
7071
boolean deployModel = registerModelInput.isDeployModel();
7172
String[] modelNodeIds = registerModelInput.getModelNodeIds();
7273
String modelGroupId = registerModelInput.getModelGroupId();
74+
MLDeploySetting mlDeploySetting = registerModelInput.getDeploySetting();
7375
try {
7476
AccessController.doPrivileged((PrivilegedExceptionAction<Void>) () -> {
7577

@@ -104,7 +106,9 @@ public void downloadPrebuiltModelConfig(
104106
.modelNodeIds(modelNodeIds)
105107
.isHidden(isHidden)
106108
.modelGroupId(modelGroupId)
107-
.functionName(FunctionName.from((functionName)));
109+
.functionName(FunctionName.from((functionName)))
110+
.deploySetting(mlDeploySetting);
111+
108112
config.entrySet().forEach(entry -> {
109113
switch (entry.getKey().toString()) {
110114
case MLRegisterModelInput.MODEL_FORMAT_FIELD:

0 commit comments

Comments
 (0)