Skip to content

Commit

Permalink
excluding remote models from max node per node setting (#2732)
Browse files Browse the repository at this point in the history
Signed-off-by: Dhrubo Saha <[email protected]>
  • Loading branch information
dhrubo-os authored Jul 24, 2024
1 parent bf0c7fa commit 9ea79d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ public void deployModel(
mlStats.createModelCounterStatIfAbsent(modelId, ActionName.DEPLOY, ML_ACTION_REQUEST_COUNT).increment();
List<String> workerNodes = mlTask.getWorkerNodes();
if (modelCacheHelper.isModelDeployed(modelId)) {
if (!autoDeployModel && workerNodes != null && workerNodes.size() > 0) {
if (!autoDeployModel && workerNodes != null && !workerNodes.isEmpty()) {
log.info("Set new target node ids {} for model {}", Arrays.toString(workerNodes.toArray(new String[0])), modelId);
modelCacheHelper.setDeployToAllNodes(modelId, deployToAllNodes);
modelCacheHelper.setTargetWorkerNodes(modelId, workerNodes);
Expand All @@ -999,7 +999,7 @@ public void deployModel(
listener.onResponse("successful");
return;
}
if (modelCacheHelper.getLocalDeployedModels().length >= maxModelPerNode) {
if (functionName != FunctionName.REMOTE && modelCacheHelper.getLocalDeployedModels().length >= maxModelPerNode) {
listener.onFailure(new IllegalArgumentException("Exceed max local model per node limit"));
return;
}
Expand Down

0 comments on commit 9ea79d0

Please sign in to comment.