From beb2a75a26e38b989b2494dbe8cbbe2bc581b81d Mon Sep 17 00:00:00 2001 From: asaiacai Date: Wed, 27 Sep 2023 18:29:16 -0700 Subject: [PATCH] format --- 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 813605e82d8..cfb333c6e4d 100644 --- a/sky/backends/cloud_vm_ray_backend.py +++ b/sky/backends/cloud_vm_ray_backend.py @@ -3034,11 +3034,13 @@ def _setup(self, handle: CloudVmRayResourceHandle, task: task_lib.Task, if task.setup is None: return - + stable_cluster_internal_ips = handle.internal_ips() sky_env_vars_dict = {} - sky_env_vars_dict["SKYPILOT_NODE_IPS"] = "\\n".join(stable_cluster_internal_ips) - sky_env_vars_dict["SKYPILOT_NODE_RANK"] = """$(expr $(printf ${SKYPILOT_NODE_IPS} | grep -n "$(hostname -i)" | awk -F: '{print $1}') - 1)""" + sky_env_vars_dict["SKYPILOT_NODE_IPS"] = "\\n".join( + stable_cluster_internal_ips) + sky_env_vars_dict[ + "SKYPILOT_NODE_RANK"] = """$(expr $(printf ${SKYPILOT_NODE_IPS} | grep -n "$(hostname -i)" | awk -F: '{print $1}') - 1)""" env_vars = {**task.envs, **sky_env_vars_dict} setup_script = log_lib.make_task_bash_script(task.setup, env_vars=env_vars)