Skip to content

Commit

Permalink
only add model info to cache if model cache exist
Browse files Browse the repository at this point in the history
Signed-off-by: Yaliang Wu <[email protected]>
  • Loading branch information
ylwu-amzn committed Oct 11, 2023
1 parent 99e34a0 commit ef8da7b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ public boolean getDeployToAllNodes(String modelId) {
}

public void setModelInfo(String modelId, MLModel mlModel) {
MLModelCache mlModelCache = getExistingModelCache(modelId);
mlModelCache.setModelInfo(mlModel);
MLModelCache mlModelCache = modelCaches.get(modelId);
if (mlModelCache != null) {
mlModelCache.setModelInfo(mlModel);
}
}

public MLModel getModelInfo(String modelId) {
Expand Down

0 comments on commit ef8da7b

Please sign in to comment.