diff --git a/python/ray/autoscaler/cli_logger.py b/python/ray/autoscaler/cli_logger.py index 0fc059d51..4461dffda 100644 --- a/python/ray/autoscaler/cli_logger.py +++ b/python/ray/autoscaler/cli_logger.py @@ -268,7 +268,7 @@ class _CliLogger(): self.pretty = _isatty() elif self._log_style == "record": self.pretty = False - self.color_mode = "false" + self._set_color_mode("false") elif self._log_style == "pretty": self.pretty = True diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 2b62441a2..1b4b5c6f2 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -117,17 +117,6 @@ def create_or_update_cluster(config_file: str, else: cmd_output_util.set_output_redirected(redirect_command_output) - if use_login_shells: - cli_logger.warning( - "Commands running under a login shell can produce more " - "output than special processing can handle.") - cli_logger.warning( - "Thus, the output from subcommands will be logged as is.") - cli_logger.warning( - "Consider using {}, {}.", cf.bold("--use-normal-shells"), - cf.underlined("if you tested your workflow and it is compatible")) - cli_logger.newline() - def handle_yaml_error(e): cli_logger.error("Cluster config invalid") cli_logger.newline() @@ -508,7 +497,6 @@ def get_or_create_head_node(config, config["cluster_name"])) config = copy.deepcopy(config) - raw_config_file = config_file # used for printing to the user config_file = os.path.abspath(config_file) try: head_node_tags = { @@ -741,12 +729,12 @@ def get_or_create_head_node(config, with cli_logger.group("Useful commands"): cli_logger.print("Monitor autoscaling with") cli_logger.print( - cf.bold(" ray exec {}{} {}"), raw_config_file, modifiers, + cf.bold(" ray exec {}{} {}"), config_file, modifiers, quote(monitor_str)) cli_logger.print("Connect to a terminal on the cluster head") cli_logger.print( - cf.bold(" ray attach {}{}"), raw_config_file, modifiers) + cf.bold(" ray attach {}{}"), config_file, modifiers) finally: provider.cleanup() diff --git a/python/ray/tests/test_cli_patterns/test_ray_up.txt b/python/ray/tests/test_cli_patterns/test_ray_up.txt index 5804f5825..3ae4349bf 100644 --- a/python/ray/tests/test_cli_patterns/test_ray_up.txt +++ b/python/ray/tests/test_cli_patterns/test_ray_up.txt @@ -1,7 +1,3 @@ -Commands running under a login shell can produce more output than special processing can handle\. -Thus, the output from subcommands will be logged as is\. -Consider using --use-normal-shells, if you tested your workflow and it is compatible\. - Cluster configuration valid Cluster: test-cli @@ -45,6 +41,6 @@ Acquiring an up-to-date head node Useful commands Monitor autoscaling with - ray exec .+ 'tail -n 100 -f /tmp/ray/session_\*/logs/monitor\*' + ray exec .+ 'tail -n 100 -f /tmp/ray/session_latest/logs/monitor\*' Connect to a terminal on the cluster head ray attach .+ diff --git a/python/ray/tests/test_cli_patterns/test_ray_up_record.txt b/python/ray/tests/test_cli_patterns/test_ray_up_record.txt index 8021628ca..0aa137248 100644 --- a/python/ray/tests/test_cli_patterns/test_ray_up_record.txt +++ b/python/ray/tests/test_cli_patterns/test_ray_up_record.txt @@ -1,6 +1,3 @@ -.+\.py.*Commands running under a login shell can produce more output than special processing can handle\. -.+\.py.*Thus, the output from subcommands will be logged as is\. -.+\.py.*Consider using --use-normal-shells, if you tested your workflow and it is compatible\. .+\.py.*Cluster configuration valid .+\.py.*Cluster: test-cli .+\.py.*Bootstrapping AWS config