From 3dc68533a90024c0468063cfe3a1b13450d8d4f9 Mon Sep 17 00:00:00 2001 From: Alan Guo Date: Mon, 16 Nov 2020 14:31:41 -0800 Subject: [PATCH] make some private rsync, and exec_cluster arguments public (#11958) * make some private rsync, and exec_cluster arguments public * fix format issue * undo make all_nodes public --- python/ray/autoscaler/sdk.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/python/ray/autoscaler/sdk.py b/python/ray/autoscaler/sdk.py index 87559c099..bf190fe69 100644 --- a/python/ray/autoscaler/sdk.py +++ b/python/ray/autoscaler/sdk.py @@ -70,6 +70,8 @@ def run_on_cluster(cluster_config: Union[dict, str], *, cmd: Optional[str] = None, run_env: str = "auto", + tmux: bool = False, + stop: bool = False, no_config_cache: bool = False, port_forward: Optional[commands.Port_forward] = None, with_output: bool = False) -> Optional[str]: @@ -81,6 +83,8 @@ def run_on_cluster(cluster_config: Union[dict, str], cmd (str): the command to run, or None for a no-op command. run_env (str): whether to run the command on the host or in a container. Select between "auto", "host" and "docker". + tmux (bool): whether to run in a tmux session + stop (bool): whether to stop the cluster after command run no_config_cache (bool): Whether to disable the config cache and fully resolve all environment settings from the Cloud provider again. port_forward ( (int,int) or list[(int,int)]): port(s) to forward. @@ -95,8 +99,8 @@ def run_on_cluster(cluster_config: Union[dict, str], cmd=cmd, run_env=run_env, screen=False, - tmux=False, - stop=False, + tmux=tmux, + stop=stop, start=False, override_cluster_name=None, no_config_cache=no_config_cache, @@ -106,8 +110,8 @@ def run_on_cluster(cluster_config: Union[dict, str], def rsync(cluster_config: Union[dict, str], *, - source: str, - target: str, + source: Optional[str], + target: Optional[str], down: bool, ip_address: str = None, use_internal_ip: bool = False,