Skip to content

Commit

Permalink
Performance enhacement for predict action by caching model info (open…
Browse files Browse the repository at this point in the history
…search-project#1472)

* Performance enhacement for predict action by caching model info

Signed-off-by: zane-neo <[email protected]>

* Add context.restore() to avoid missing info

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit a985f6e)
  • Loading branch information
zane-neo authored and rbhavna committed Oct 11, 2023
1 parent da5d829 commit 570547b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,7 @@ public void setModelInfo(String modelId, MLModel mlModel) {
}

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

Expand Down

0 comments on commit 570547b

Please sign in to comment.