diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 4c09e8bf3..0bd7aa758 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -94,12 +94,16 @@ def request_resources(num_cpus=None, bundles=None): r.publish(AUTOSCALER_RESOURCE_REQUEST_CHANNEL, json.dumps(bundles)) -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, dump_command_output: bool, - use_login_shells: bool) -> None: +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, + dump_command_output: bool = True, + use_login_shells: bool = True) -> None: """Create or updates an autoscaling Ray cluster from a config json.""" set_using_login_shells(use_login_shells) cmd_output_util.set_output_redirected(not dump_command_output) diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py index 082fbc360..8dc524d23 100644 --- a/python/ray/scripts/scripts.py +++ b/python/ray/scripts/scripts.py @@ -1233,8 +1233,17 @@ def submit(cluster_config_file, screen, tmux, stop, start, cluster_name, "`ray submit [yaml] script.py -- --arg1 --arg2` instead.") if start: - create_or_update_cluster(cluster_config_file, None, None, False, False, - True, cluster_name, False) + create_or_update_cluster( + config_file=cluster_config_file, + override_min_workers=None, + override_max_workers=None, + no_restart=False, + restart_only=False, + yes=True, + override_cluster_name=cluster_name, + no_config_cache=False, + dump_command_output=True, + use_login_shells=True) target = os.path.basename(script) target = os.path.join("~", target) rsync(cluster_config_file, script, target, cluster_name, down=False)