From 6e51ee08161a543c7b17ba4dfdbc43c17934f50c Mon Sep 17 00:00:00 2001 From: Isaac Ong Date: Mon, 31 Oct 2022 20:29:22 -0700 Subject: [PATCH 1/3] Add tip for node rank to docs --- docs/source/running-jobs/distributed-jobs.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/running-jobs/distributed-jobs.rst b/docs/source/running-jobs/distributed-jobs.rst index 8bf9d48e26c..1fcc8c4ef43 100644 --- a/docs/source/running-jobs/distributed-jobs.rst +++ b/docs/source/running-jobs/distributed-jobs.rst @@ -49,5 +49,8 @@ SkyPilot exposes these environment variables that can be accessed in a task's `` You can retrieve the number of nodes by :code:`echo "$SKY_NODE_IPS" | wc -l` and the IP address of the third node by :code:`echo "$SKY_NODE_IPS" | sed -n 3p`. + + To manipulate these IP addresses, you can also store them to a file in the + :code:`run` command with :code:`echo $SKY_NODE_IPS >> ~/sky_node_ips``. - :code:`SKY_NUM_GPUS_PER_NODE`: number of GPUs reserved on each node to execute the task; the same as the count in ``accelerators: :`` (rounded up if a fraction). From 3caefe5116471da3c65b0ced726b82747e483283 Mon Sep 17 00:00:00 2001 From: Isaac Ong Date: Mon, 31 Oct 2022 20:50:35 -0700 Subject: [PATCH 2/3] Update formatting --- docs/source/running-jobs/distributed-jobs.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/running-jobs/distributed-jobs.rst b/docs/source/running-jobs/distributed-jobs.rst index 1fcc8c4ef43..086143de942 100644 --- a/docs/source/running-jobs/distributed-jobs.rst +++ b/docs/source/running-jobs/distributed-jobs.rst @@ -46,11 +46,11 @@ SkyPilot exposes these environment variables that can be accessed in a task's `` - :code:`SKY_NODE_IPS`: a string of IP addresses of the nodes reserved to execute the task, where each line contains one IP address. - You can retrieve the number of nodes by :code:`echo "$SKY_NODE_IPS" | wc -l` + - You can retrieve the number of nodes by :code:`echo "$SKY_NODE_IPS" | wc -l` and the IP address of the third node by :code:`echo "$SKY_NODE_IPS" | sed -n 3p`. - To manipulate these IP addresses, you can also store them to a file in the - :code:`run` command with :code:`echo $SKY_NODE_IPS >> ~/sky_node_ips``. + - To manipulate these IP addresses, you can also store them to a file in the + :code:`run` command with :code:`echo $SKY_NODE_IPS >> ~/sky_node_ips`. - :code:`SKY_NUM_GPUS_PER_NODE`: number of GPUs reserved on each node to execute the task; the same as the count in ``accelerators: :`` (rounded up if a fraction). From fcce16a93672ed7da0918cac7c5f31c42c1f6b24 Mon Sep 17 00:00:00 2001 From: Zongheng Yang Date: Mon, 31 Oct 2022 21:38:53 -0700 Subject: [PATCH 3/3] Indent fix. --- docs/source/running-jobs/distributed-jobs.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/running-jobs/distributed-jobs.rst b/docs/source/running-jobs/distributed-jobs.rst index 086143de942..f8252bcbccb 100644 --- a/docs/source/running-jobs/distributed-jobs.rst +++ b/docs/source/running-jobs/distributed-jobs.rst @@ -47,10 +47,10 @@ SkyPilot exposes these environment variables that can be accessed in a task's `` the task, where each line contains one IP address. - You can retrieve the number of nodes by :code:`echo "$SKY_NODE_IPS" | wc -l` - and the IP address of the third node by :code:`echo "$SKY_NODE_IPS" | sed -n - 3p`. + and the IP address of the third node by :code:`echo "$SKY_NODE_IPS" | sed -n + 3p`. - To manipulate these IP addresses, you can also store them to a file in the - :code:`run` command with :code:`echo $SKY_NODE_IPS >> ~/sky_node_ips`. + :code:`run` command with :code:`echo $SKY_NODE_IPS >> ~/sky_node_ips`. - :code:`SKY_NUM_GPUS_PER_NODE`: number of GPUs reserved on each node to execute the task; the same as the count in ``accelerators: :`` (rounded up if a fraction).