[autoscaler] remove worker_default_node_type that is useless. (#13588)

This commit is contained in:
Ameer Haj Ali 2021-01-22 03:04:38 +02:00 committed by GitHub
parent 4e01a9ec38
commit 1fbb752f42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1 additions and 32 deletions

View file

@ -111,9 +111,6 @@ An example of configuring multiple node types is as follows `(full example) <htt
# Specify the node type of the head node (as configured above).
head_node_type: cpu_4_ondemand
# Specify the default type of the worker node (as configured above).
worker_default_node_type: cpu_16_spot
The above config defines two CPU node types (``cpu_4_ondemand`` and ``cpu_16_spot``), and two GPU types (``gpu_1_ondemand`` and ``gpu_8_ondemand``). Each node type has a name (e.g., ``cpu_4_ondemand``), which has no semantic meaning and is only for debugging. Let's look at the inner fields of the ``gpu_1_ondemand`` node type:

View file

@ -85,13 +85,6 @@ def validate_config(config: Dict[str, Any]) -> None:
if config["head_node_type"] not in config["available_node_types"]:
raise ValueError(
"`head_node_type` must be one of `available_node_types`.")
if "worker_default_node_type" not in config:
raise ValueError("You must specify `worker_default_node_type` if "
"`available_node_types is set.")
if (config["worker_default_node_type"] not in config[
"available_node_types"]):
raise ValueError("`worker_default_node_type` must be one of "
"`available_node_types`.")
def prepare_config(config):
@ -123,7 +116,6 @@ def rewrite_legacy_yaml_to_available_node_types(
},
}
config["head_node_type"] = NODE_TYPE_LEGACY_HEAD
config["worker_default_node_type"] = NODE_TYPE_LEGACY_WORKER
return config

View file

@ -55,9 +55,6 @@ available_node_types:
# Specify the node type of the head node (as configured above).
head_node_type: cpu_4_ondemand
# Specify the default type of the worker node (as configured above).
worker_default_node_type: cpu_16_spot
# The default settings for the head node. This will be merged with the per-node
# type configs given above.
head_node:

View file

@ -25,7 +25,6 @@ spec:
required:
- podTypes
- headPodType
- workerDefaultPodType
properties:
maxWorkers:
description: The maximum number of workers nodes to launch in addition to the
@ -4264,9 +4263,6 @@ spec:
headPodType:
description: Specifies the head node type.
type: string
workerDefaultPodType:
description: Specifies the default worker node type.
type: string
headStartRayCommands:
description: Commands to start Ray on the head node.
type: array

View file

@ -14,8 +14,6 @@ spec:
idleTimeoutMinutes: 5
# Specify the pod type for the ray head node (as configured below).
headPodType: head-node
# Specify the default pod type for ray the worker nodes (as configured below).
workerDefaultPodType: worker-nodes
# Specify the allowed pod types for this ray cluster and the resources they provide.
podTypes:
- name: head-node

View file

@ -14,8 +14,6 @@ spec:
idleTimeoutMinutes: 5
# Specify the pod type for the ray head node (as configured below).
headPodType: head-node
# Specify the default pod type for ray the worker nodes (as configured below).
workerDefaultPodType: worker-nodes
# Specify the allowed pod types for this ray cluster and the resources they provide.
podTypes:
- name: head-node

View file

@ -254,10 +254,6 @@
"type": "string",
"description": "If using multiple node types, specifies the head node type."
},
"worker_default_node_type": {
"type": "string",
"description": "If using multiple node types, specifies the default worker node type."
},
"head_node": {
"type": "object",
"description": "Provider-specific config for the head node, e.g. instance type."

View file

@ -103,9 +103,6 @@ available_node_types:
# Specify the node type of the head node (as configured above).
head_node_type: cpu_4_ondemand
# Specify the default type of the worker node (as configured above).
worker_default_node_type: cpu_4_spot
# The default settings for the head node. This will be merged with the per-node
# type configs given above.
#head_node:

View file

@ -17,7 +17,6 @@ CONFIG_FIELDS = {
"upscalingSpeed": "upscaling_speed",
"idleTimeoutMinutes": "idle_timeout_minutes",
"headPodType": "head_node_type",
"workerDefaultPodType": "worker_default_node_type",
"workerStartRayCommands": "worker_start_ray_commands",
"headStartRayCommands": "head_start_ray_commands",
"podTypes": "available_node_types"

View file

@ -87,8 +87,7 @@ TYPES_A = {
MULTI_WORKER_CLUSTER = dict(
SMALL_CLUSTER, **{
"available_node_types": TYPES_A,
"head_node_type": "empty_node",
"worker_default_node_type": "m4.large",
"head_node_type": "empty_node"
})