From a9c1ec8b138ec85da54492ca6777cc328d53c367 Mon Sep 17 00:00:00 2001 From: Dhrubo Saha Date: Tue, 3 Oct 2023 15:57:18 -0700 Subject: [PATCH] addressed comments Signed-off-by: Dhrubo Saha --- .../src/main/java/org/opensearch/ml/model/MLModelManager.java | 3 --- 1 file changed, 3 deletions(-) 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 06df1d47a7..759b0cec9f 100644 --- a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java +++ b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java @@ -293,7 +293,6 @@ private void uploadMLModelMeta(MLRegisterModelMetaInput mlRegisterModelMetaInput client.index(indexRequest, ActionListener.wrap(response -> { log.debug("Index model meta doc successfully {}", modelName); - mlStats.createModelCounterStatIfAbsent(response.getId(), REGISTER, ML_ACTION_REQUEST_COUNT).increment(); wrappedListener.onResponse(response.getId()); }, e -> { log.error("Failed to index model meta doc", e); @@ -579,7 +578,6 @@ private void indexRemoteModel(MLRegisterModelInput registerModelInput, MLTask ml String modelId = modelMetaRes.getId(); mlTask.setModelId(modelId); log.info("create new model meta doc {} for upload task {}", modelId, taskId); - mlStats.createModelCounterStatIfAbsent(modelId, REGISTER, ML_ACTION_REQUEST_COUNT).increment(); mlTaskManager.updateMLTask(taskId, ImmutableMap.of(MODEL_ID_FIELD, modelId, STATE_FIELD, COMPLETED), 5000, true); if (registerModelInput.isDeployModel()) { deployModelAfterRegistering(registerModelInput, modelId); @@ -642,7 +640,6 @@ private void registerModelFromUrl(MLRegisterModelInput registerModelInput, MLTas String modelId = modelMetaRes.getId(); mlTask.setModelId(modelId); log.info("create new model meta doc {} for register model task {}", modelId, taskId); - mlStats.createModelCounterStatIfAbsent(modelId, REGISTER, ML_ACTION_REQUEST_COUNT).increment(); // model group id is not present in request body. registerModel(registerModelInput, taskId, functionName, modelName, version, modelId); }, e -> {