Skip to content

Commit

Permalink
fix failed ut from PR 1472 (#1479)
Browse files Browse the repository at this point in the history
* fix failed ut from PR 1472

Signed-off-by: Yaliang Wu <[email protected]>

* exclude class for low coverage

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
  • Loading branch information
ylwu-amzn authored Oct 10, 2023
1 parent 201c8a8 commit da5d829
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ List<String> jacocoExclusions = [
'org.opensearch.ml.action.deploy.TransportDeployModelAction',
'org.opensearch.ml.action.deploy.TransportDeployModelOnNodeAction',
'org.opensearch.ml.action.prediction.TransportPredictionTaskAction',
'org.opensearch.ml.action.prediction.TransportPredictionTaskAction.1',
'org.opensearch.ml.action.tasks.GetTaskTransportAction',
'org.opensearch.ml.action.tasks.SearchTaskTransportAction',
'org.opensearch.ml.model.MLModelManager',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ public void setModelInfo(String modelId, MLModel mlModel) {
}

public MLModel getModelInfo(String modelId) {
MLModelCache mlModelCache = getExistingModelCache(modelId);
MLModelCache mlModelCache = modelCaches.get(modelId);
if (mlModelCache == null) {
return null;
}
return mlModelCache.getCachedModelInfo();
}

Expand Down

0 comments on commit da5d829

Please sign in to comment.