mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[autoscaler] remove worker_default_node_type that is useless. (#13588)
This commit is contained in:
parent
4e01a9ec38
commit
1fbb752f42
10 changed files with 1 additions and 32 deletions
|
@ -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).
|
# Specify the node type of the head node (as configured above).
|
||||||
head_node_type: cpu_4_ondemand
|
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:
|
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:
|
||||||
|
|
||||||
|
|
|
@ -85,13 +85,6 @@ def validate_config(config: Dict[str, Any]) -> None:
|
||||||
if config["head_node_type"] not in config["available_node_types"]:
|
if config["head_node_type"] not in config["available_node_types"]:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"`head_node_type` must be one of `available_node_types`.")
|
"`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):
|
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["head_node_type"] = NODE_TYPE_LEGACY_HEAD
|
||||||
config["worker_default_node_type"] = NODE_TYPE_LEGACY_WORKER
|
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,6 @@ available_node_types:
|
||||||
# Specify the node type of the head node (as configured above).
|
# Specify the node type of the head node (as configured above).
|
||||||
head_node_type: cpu_4_ondemand
|
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
|
# The default settings for the head node. This will be merged with the per-node
|
||||||
# type configs given above.
|
# type configs given above.
|
||||||
head_node:
|
head_node:
|
||||||
|
|
|
@ -25,7 +25,6 @@ spec:
|
||||||
required:
|
required:
|
||||||
- podTypes
|
- podTypes
|
||||||
- headPodType
|
- headPodType
|
||||||
- workerDefaultPodType
|
|
||||||
properties:
|
properties:
|
||||||
maxWorkers:
|
maxWorkers:
|
||||||
description: The maximum number of workers nodes to launch in addition to the
|
description: The maximum number of workers nodes to launch in addition to the
|
||||||
|
@ -4264,9 +4263,6 @@ spec:
|
||||||
headPodType:
|
headPodType:
|
||||||
description: Specifies the head node type.
|
description: Specifies the head node type.
|
||||||
type: string
|
type: string
|
||||||
workerDefaultPodType:
|
|
||||||
description: Specifies the default worker node type.
|
|
||||||
type: string
|
|
||||||
headStartRayCommands:
|
headStartRayCommands:
|
||||||
description: Commands to start Ray on the head node.
|
description: Commands to start Ray on the head node.
|
||||||
type: array
|
type: array
|
||||||
|
|
|
@ -14,8 +14,6 @@ spec:
|
||||||
idleTimeoutMinutes: 5
|
idleTimeoutMinutes: 5
|
||||||
# Specify the pod type for the ray head node (as configured below).
|
# Specify the pod type for the ray head node (as configured below).
|
||||||
headPodType: head-node
|
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.
|
# Specify the allowed pod types for this ray cluster and the resources they provide.
|
||||||
podTypes:
|
podTypes:
|
||||||
- name: head-node
|
- name: head-node
|
||||||
|
|
|
@ -14,8 +14,6 @@ spec:
|
||||||
idleTimeoutMinutes: 5
|
idleTimeoutMinutes: 5
|
||||||
# Specify the pod type for the ray head node (as configured below).
|
# Specify the pod type for the ray head node (as configured below).
|
||||||
headPodType: head-node
|
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.
|
# Specify the allowed pod types for this ray cluster and the resources they provide.
|
||||||
podTypes:
|
podTypes:
|
||||||
- name: head-node
|
- name: head-node
|
||||||
|
|
|
@ -254,10 +254,6 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "If using multiple node types, specifies the head node type."
|
"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": {
|
"head_node": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Provider-specific config for the head node, e.g. instance type."
|
"description": "Provider-specific config for the head node, e.g. instance type."
|
||||||
|
|
|
@ -103,9 +103,6 @@ available_node_types:
|
||||||
# Specify the node type of the head node (as configured above).
|
# Specify the node type of the head node (as configured above).
|
||||||
head_node_type: cpu_4_ondemand
|
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
|
# The default settings for the head node. This will be merged with the per-node
|
||||||
# type configs given above.
|
# type configs given above.
|
||||||
#head_node:
|
#head_node:
|
||||||
|
|
|
@ -17,7 +17,6 @@ CONFIG_FIELDS = {
|
||||||
"upscalingSpeed": "upscaling_speed",
|
"upscalingSpeed": "upscaling_speed",
|
||||||
"idleTimeoutMinutes": "idle_timeout_minutes",
|
"idleTimeoutMinutes": "idle_timeout_minutes",
|
||||||
"headPodType": "head_node_type",
|
"headPodType": "head_node_type",
|
||||||
"workerDefaultPodType": "worker_default_node_type",
|
|
||||||
"workerStartRayCommands": "worker_start_ray_commands",
|
"workerStartRayCommands": "worker_start_ray_commands",
|
||||||
"headStartRayCommands": "head_start_ray_commands",
|
"headStartRayCommands": "head_start_ray_commands",
|
||||||
"podTypes": "available_node_types"
|
"podTypes": "available_node_types"
|
||||||
|
|
|
@ -87,8 +87,7 @@ TYPES_A = {
|
||||||
MULTI_WORKER_CLUSTER = dict(
|
MULTI_WORKER_CLUSTER = dict(
|
||||||
SMALL_CLUSTER, **{
|
SMALL_CLUSTER, **{
|
||||||
"available_node_types": TYPES_A,
|
"available_node_types": TYPES_A,
|
||||||
"head_node_type": "empty_node",
|
"head_node_type": "empty_node"
|
||||||
"worker_default_node_type": "m4.large",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue