-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Preserve deployments with zero allocations during assignment planning #137244
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
Preserve deployments with zero allocations during assignment planning #137244
Conversation
|
Pinging @elastic/ml-core (Team:ML) |
|
Hi @jan-elastic, I've created a changelog YAML for you. |
552761f to
b506b2e
Compare
...rc/main/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlanner.java
Outdated
Show resolved
Hide resolved
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.
I did some manual testing and confirmed this works. I'll do some more testing tomorrow as well though 👍
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.
Great work on figuring out the bug! 🚀 You have my approve. ✅ I left a couple of non-essential comments and suggestions.
...l/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlan.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlan.java
Show resolved
Hide resolved
|
|
||
| Map<Node, List<Tuple<Deployment, Integer>>> nodeToModel = new HashMap<>(); | ||
| for (Deployment m : assignments.keySet()) { | ||
| for (Node n : assignments.get(m).keySet()) { |
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.
| for (Node n : assignments.get(m).keySet()) { // Note: zero-allocation deployments are not printed |
nit: zero-allocation deployments will have an empty map. So they won't be pretty-printed. Maybe either comment this nuance or extend prettyPrint() to handle zero-allocation deployments as well.
...l/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlan.java
Outdated
Show resolved
Hide resolved
...st/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlannerTests.java
Show resolved
Hide resolved
...st/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlannerTests.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/elasticsearch/xpack/ml/inference/assignment/planning/AssignmentPlan.java
Outdated
Show resolved
Hide resolved
b506b2e to
cbe6923
Compare
Fixes #137134