mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
[autoscaler] Also account for head node resources in multi node type autoscaling (#10230)
This commit is contained in:
@@ -198,12 +198,12 @@ class StandardAutoscaler:
|
||||
|
||||
# First let the resource demand scheduler launch nodes, if enabled.
|
||||
if self.resource_demand_scheduler and self.resource_demand_vector:
|
||||
# TODO(ekl) include head node in the node list
|
||||
instances = (self.resource_demand_scheduler.get_nodes_to_launch(
|
||||
nodes, self.pending_launches.breakdown(),
|
||||
to_launch = (self.resource_demand_scheduler.get_nodes_to_launch(
|
||||
self.provider.non_terminated_nodes(tag_filters={}),
|
||||
self.pending_launches.breakdown(),
|
||||
self.resource_demand_vector))
|
||||
# TODO(ekl) also enforce max launch concurrency here?
|
||||
for node_type, count in instances:
|
||||
for node_type, count in to_launch:
|
||||
self.launch_new_node(count, node_type=node_type)
|
||||
|
||||
# Launch additional nodes of the default type, if still needed.
|
||||
|
||||
Reference in New Issue
Block a user