-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run auto deploy remote model in partially deployed status #3423
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Xun Zhang <[email protected]>
@@ -2460,6 +2460,10 @@ public int getWorkerNodesSize(String modelId, FunctionName functionName) { | |||
return getWorkerNodes(modelId, functionName, false).length; | |||
} | |||
|
|||
public String[] getTargetWorkerNodes(String modelId) { | |||
return modelCacheHelper.getTargetWorkerNodes(modelId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think returning empty string array here instead of null? since null may cause NPE
if (modelCache == null) { | ||
return null; | ||
} | ||
return modelCache.getTargetWorkerNodes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should consider deploy to all nodes case.
If deploy to all nodes is try and target work nodes may be [node1, node2] on day1.
Then day2, user add one more nodes to cluster, now the target work nodes should be [node1, node2, node3], so we can deploy to all nodes.
I think the work node from cache will still be [node1, node2], right ? Can't remember the details, maybe it returns null or empty for deploy to all node case ? Can you confirm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see the synup job only syncs up the worker nodes, but not the target worker nodes. This is another enhancement needed. Both the target worker nodes and running worker nodes needs to be up-to-date in the memory so it can cover all kinds of cases.
@@ -2460,6 +2460,10 @@ public int getWorkerNodesSize(String modelId, FunctionName functionName) { | |||
return getWorkerNodes(modelId, functionName, false).length; | |||
} | |||
|
|||
public String[] getTargetWorkerNodes(String modelId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add java doc to the public method?
Can we add tests? |
Description
Currently the remote model auto-deploy only happens when the model is not deployed at all, by checking the running worker nodes == 0. But in some edge cases, we'd like to auto-deploy the model even it's in PARTIALLY_DEPLOYED status.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.