Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autoscaler] CLI Logger docs #9690

Merged
merged 16 commits into from
Jul 24, 2020
Prev Previous commit
Next Next commit
pull master
  • Loading branch information
maximsmol committed Jul 24, 2020
commit 81eef9290bac99e0124e9a83b4928b2fad2d10cc
19 changes: 12 additions & 7 deletions python/ray/autoscaler/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ def request_resources(num_cpus=None, bundles=None):
r.publish(AUTOSCALER_RESOURCE_REQUEST_CHANNEL, json.dumps(bundles))


def create_or_update_cluster(config_file, override_min_workers,
override_max_workers, no_restart, restart_only,
yes, override_cluster_name, no_config_cache,
log_old_style, log_color, verbose):
def create_or_update_cluster(
config_file: str, override_min_workers: Optional[int],
override_max_workers: Optional[int], no_restart: bool,
restart_only: bool, yes: bool, override_cluster_name: Optional[str],
no_config_cache: bool, log_old_style: bool, log_color: str,
verbose: int) -> None:
"""Create or updates an autoscaling Ray cluster from a config json."""
cli_logger.old_style = log_old_style
cli_logger.color_mode = log_color
Expand Down Expand Up @@ -179,7 +181,8 @@ def handle_cli_override(key, override):
CONFIG_CACHE_VERSION = 1


def _bootstrap_config(config, no_config_cache=False):
def _bootstrap_config(config: Dict[str, Any],
no_config_cache: bool = False) -> Dict[str, Any]:
config = prepare_config(config)

hasher = hashlib.sha1()
Expand Down Expand Up @@ -235,8 +238,10 @@ def _bootstrap_config(config, no_config_cache=False):
return resolved_config


def teardown_cluster(config_file, yes, workers_only, override_cluster_name,
keep_min_workers, log_old_style, log_color, verbose):
def teardown_cluster(config_file: str, yes: bool, workers_only: bool,
override_cluster_name: Optional[str],
keep_min_workers: bool, log_old_style: bool,
log_color: str, verbose: int):
"""Destroys all nodes of a Ray cluster described by a config json."""
cli_logger.old_style = log_old_style
cli_logger.color_mode = log_color
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.