From 8e861570c174bc0ec96c3578a07d90a21bcf6263 Mon Sep 17 00:00:00 2001 From: Sicheng Song Date: Tue, 19 Mar 2024 00:20:34 -0700 Subject: [PATCH] Fix model enable flag not loading (#2221) Signed-off-by: Sicheng Song --- .../src/main/java/org/opensearch/ml/model/MLModelManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java index 2736234d85..bdcb78d6ad 100644 --- a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java +++ b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java @@ -294,6 +294,7 @@ private void uploadMLModelMeta(MLRegisterModelMetaInput mlRegisterModelMetaInput .modelGroupId(mlRegisterModelMetaInput.getModelGroupId()) .description(mlRegisterModelMetaInput.getDescription()) .rateLimiter(mlRegisterModelMetaInput.getRateLimiter()) + .isEnabled(mlRegisterModelMetaInput.getIsEnabled()) .modelFormat(mlRegisterModelMetaInput.getModelFormat()) .modelState(MLModelState.REGISTERING) .modelConfig(mlRegisterModelMetaInput.getModelConfig()) @@ -525,6 +526,7 @@ private void indexRemoteModel( .version(version) .description(registerModelInput.getDescription()) .rateLimiter(registerModelInput.getRateLimiter()) + .isEnabled(registerModelInput.getIsEnabled()) .modelFormat(registerModelInput.getModelFormat()) .modelState(MLModelState.REGISTERED) .connector(registerModelInput.getConnector()) @@ -590,6 +592,7 @@ void indexRemoteModel(MLRegisterModelInput registerModelInput, MLTask mlTask, St .version(version) .description(registerModelInput.getDescription()) .rateLimiter(registerModelInput.getRateLimiter()) + .isEnabled(registerModelInput.getIsEnabled()) .modelFormat(registerModelInput.getModelFormat()) .modelState(MLModelState.REGISTERED) .connector(registerModelInput.getConnector()) @@ -657,6 +660,7 @@ private void registerModelFromUrl(MLRegisterModelInput registerModelInput, MLTas .version(version) .description(registerModelInput.getDescription()) .rateLimiter(registerModelInput.getRateLimiter()) + .isEnabled(registerModelInput.getIsEnabled()) .modelFormat(registerModelInput.getModelFormat()) .modelState(MLModelState.REGISTERING) .modelConfig(registerModelInput.getModelConfig())