From f6fae9b5e7326d8f34a7fea8e9ef081f00474a13 Mon Sep 17 00:00:00 2001 From: Christopher Cooper Date: Fri, 1 Nov 2024 16:40:47 -0700 Subject: [PATCH] do not redirect stderr to /dev/null when submitting job Should fix #4199. --- sky/backends/cloud_vm_ray_backend.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sky/backends/cloud_vm_ray_backend.py b/sky/backends/cloud_vm_ray_backend.py index 0013e6cbaf9..9e694f9603c 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -3278,9 +3278,11 @@ def _exec_code_on_head( f'{cd} && {constants.SKY_RAY_CMD} job submit ' '--address=http://127.0.0.1:$RAY_DASHBOARD_PORT ' f'--submission-id {job_id}-$(whoami) --no-wait ' - # Redirect stderr to /dev/null to avoid distracting error from ray. - f'"{constants.SKY_PYTHON_CMD} -u {script_path} > {remote_log_path} ' - '2> /dev/null"') + # Do not use &>, which is not POSIX and may not work. + f'"{constants.SKY_PYTHON_CMD} -u {script_path} 2>&1 ' + # Filter distracting error from ray. + '| grep --line-buffered -v https://github.com/ray-project/ray/issues/3644 ' + f'> {remote_log_path}"') code = job_lib.JobLibCodeGen.queue_job(job_id, job_submit_cmd) job_submit_cmd = ' && '.join([mkdir_code, create_script_code, code])