Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zhangxunmt
Copy link
Collaborator

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

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@@ -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);
Copy link
Contributor

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();
Copy link
Collaborator

@ylwu-amzn ylwu-amzn Jan 23, 2025

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 ?

Copy link
Collaborator Author

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) {
Copy link
Collaborator

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?

@dhrubo-os
Copy link
Collaborator

Can we add tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants