[autoscaler] Support min_workers for multi node type (#11041)

* prepare for head node

* move command runner interface outside _private

* remove space

* Eric

* flake

* min_workers in multi node type

* fixing edge cases

* eric not idle

* fix target_workers to consider min_workers of node types

* idle timeout

* minor

* minor fix

* test

* lint

* eric v2

* eric 3

* min_workers constraint before bin packing

* Update resource_demand_scheduler.py

* Revert "Update resource_demand_scheduler.py"

This reverts commit 818a63a2c86d8437b3ef21c5035d701c1d1127b5.

* reducing diff

Co-authored-by: Ameer Haj Ali <ameerhajali@ameers-mbp.lan>
Co-authored-by: Alex Wu <alex@anyscale.io>
Co-authored-by: Alex Wu <itswu.alex@gmail.com>
This commit is contained in:
Ameer Haj Ali
2020-09-28 22:02:01 -07:00
committed by GitHub
co-authored by Ameer Haj Ali Alex Wu Alex Wu
parent 0a6164ab15
commit 0d36e4c025
6 changed files with 286 additions and 36 deletions
+3 -1
View File
@@ -72,6 +72,7 @@ An example of configuring multiple node types is as follows `(full example) <htt
node_config:
InstanceType: m4.xlarge
resources: {"CPU": 4}
min_workers: 1
max_workers: 5
cpu_16_spot:
node_config:
@@ -117,10 +118,11 @@ The resources field tells the autoscaler what kinds of resources this node provi
resources: {"CPU": 4, "GPU": 1, "Custom2": 2}
The ``max_workers`` field constrains the number of nodes of this type that can be launched:
The ``min_workers`` and ``max_workers`` fields constrain the minimum and maximum number of nodes of this type to launch, respectively:
.. code::
min_workers: 1
max_workers: 4
The ``worker_setup_commands`` field (and also the ``initialization_commands`` field, not shown) can be used to override the setup and initialization commands for a node type. Note that you can only override the setup for worker nodes. The head node's setup commands are always configured via the top level field in the cluster YAML: