[minor] improve warning message for Ray (#15005)

This commit is contained in:
Richard Liaw 2021-04-05 12:39:42 -07:00 committed by GitHub
parent 5806e726f4
commit 6269140ef8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 22 deletions

View file

@ -12,9 +12,10 @@ from typing import Any, Dict, List
import ray
import ray.ray_constants
import ray._private.services as services
from ray.autoscaler._private import constants
from ray.autoscaler._private.providers import _get_default_config
from ray.autoscaler._private.docker import validate_docker_config
from ray.autoscaler._private import constants
from ray.autoscaler._private.cli_logger import cli_logger
from ray.autoscaler.tags import NODE_TYPE_LEGACY_WORKER, NODE_TYPE_LEGACY_HEAD
REQUIRED, OPTIONAL = True, False
@ -144,11 +145,12 @@ def merge_legacy_yaml_with_defaults(
"""Rewrite legacy config's available node types after it has been merged
with defaults yaml.
"""
logger.warning("Converting legacy cluster config to multi node types.\n"
"Refer to the docs for examples of multi-node-type "
"autoscaling:\n"
"https://docs.ray.io/en/master/cluster/config.html"
"#full-configuration")
cli_logger.warning(
"Converting legacy cluster config to a multi node type cluster "
"config. Multi-node-type cluster configs are the recommended "
"format for configuring Ray clusters. "
"See the docs for more information:\n"
"https://docs.ray.io/en/master/cluster/config.html#full-configuration")
# Get default head and worker types.
default_head_type = merged_config["head_node_type"]

View file

@ -3,9 +3,20 @@ auth:
cluster_name: test-cli
file_mounts:
~/tests: .
head_node:
ImageId: latest_dlami
InstanceType: t1.micro
available_node_types:
head_node:
resources: {}
node_config:
ImageId: latest_dlami
InstanceType: t1.micro
worker_nodes:
resources: {}
max_workers: 2
min_workers: 1
node_config:
ImageId: latest_dlami
InstanceType: t1.micro
head_node_type: head_node
head_setup_commands:
- echo head
head_start_ray_commands:
@ -14,8 +25,6 @@ head_start_ray_commands:
idle_timeout_minutes: 5
initialization_commands:
- echo init
max_workers: 2
min_workers: 1
provider:
availability_zone: us-west-2a
key_pair:
@ -26,9 +35,6 @@ setup_commands:
- echo a
- echo b
- echo ${echo hi}
worker_nodes:
ImageId: latest_dlami
InstanceType: t1.micro
worker_setup_commands:
- echo worker
worker_start_ray_commands:

View file

@ -8,9 +8,20 @@ docker:
run_options: []
file_mounts:
~/tests: .
head_node:
ImageId: latest_dlami
InstanceType: t3a.small
available_node_types:
head_node:
resources: {}
node_config:
ImageId: latest_dlami
InstanceType: t1.micro
worker_nodes:
resources: {}
max_workers: 2
min_workers: 1
node_config:
ImageId: latest_dlami
InstanceType: t1.micro
head_node_type: head_node
head_setup_commands:
- echo head
head_start_ray_commands:
@ -19,8 +30,6 @@ head_start_ray_commands:
idle_timeout_minutes: 5
initialization_commands:
- echo init
max_workers: 2
min_workers: 1
provider:
availability_zone: us-west-2a
key_pair:
@ -31,9 +40,6 @@ setup_commands:
- echo a
- echo b
- echo ${echo hi}
worker_nodes:
ImageId: latest_dlami
InstanceType: t3a.small
worker_setup_commands:
- echo worker
worker_start_ray_commands: