Skip to content

Commit

Permalink
[Docs] Fix serve docs (#3311)
Browse files Browse the repository at this point in the history
* fix update doc

* further fix for doc

* fix ref

* fix ref
  • Loading branch information
Michaelvll authored Mar 14, 2024
1 parent 527b0ae commit ed5bb75
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/source/reference/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Git and GitHub
--------------

How to clone private GitHub repositories in a task's ``setup`` commands?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is possible provided you have `set up SSH agent forwarding <https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding>`_.
For example, run the following on your laptop:
Expand Down
48 changes: 24 additions & 24 deletions docs/source/running-jobs/environment-variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,30 @@ Environment variables for ``run``
:widths: 20 70 10
:header-rows: 1

* - Name
- Definition
- Example
* - ``SKYPILOT_NODE_RANK``
- Rank (an integer ID from 0 to :code:`num_nodes-1`) of the node executing the task. Read more :ref:`here <dist-jobs>`.
- 0
* - ``SKYPILOT_NODE_IPS``
- A string of IP addresses of the nodes reserved to execute the task, where each line contains one IP address. Read more :ref:`here <dist-jobs>`.
- 1.2.3.4
* - ``SKYPILOT_NUM_GPUS_PER_NODE``
- Number of GPUs reserved on each node to execute the task; the same as the
count in ``accelerators: <name>:<count>`` (rounded up if a fraction). Read
more :ref:`here <dist-jobs>`.
- 0
* - ``SKYPILOT_TASK_ID``
- A unique ID assigned to each task.
Useful for logging purposes: e.g., use a unique output path on the cluster; pass to Weights & Biases; etc.

If a task is run as a :ref:`managed spot job <spot-jobs>`, then all
recoveries of that job will have the same ID value. Read more :ref:`here <spot-jobs-end-to-end>`.
- sky-2023-07-06-21-18-31-563597_myclus_id-1
* - ``SKYPILOT_SERVE_REPLICA_ID``
- The ID of a replica within the service (starting from 1). Available only for a :ref:`service <sky-serve>`'s replica task.
- 1
* - Name
- Definition
- Example
* - ``SKYPILOT_NODE_RANK``
- Rank (an integer ID from 0 to :code:`num_nodes-1`) of the node executing the task. Read more :ref:`here <dist-jobs>`.
- 0
* - ``SKYPILOT_NODE_IPS``
- A string of IP addresses of the nodes reserved to execute the task, where each line contains one IP address. Read more :ref:`here <dist-jobs>`.
- 1.2.3.4
* - ``SKYPILOT_NUM_GPUS_PER_NODE``
- Number of GPUs reserved on each node to execute the task; the same as the
count in ``accelerators: <name>:<count>`` (rounded up if a fraction). Read
more :ref:`here <dist-jobs>`.
- 0
* - ``SKYPILOT_TASK_ID``
- A unique ID assigned to each task.
Useful for logging purposes: e.g., use a unique output path on the cluster; pass to Weights & Biases; etc.

If a task is run as a :ref:`managed spot job <spot-jobs>`, then all
recoveries of that job will have the same ID value. Read more :ref:`here <spot-jobs-end-to-end>`.
- sky-2023-07-06-21-18-31-563597_myclus_id-1
* - ``SKYPILOT_SERVE_REPLICA_ID``
- The ID of a replica within the service (starting from 1). Available only for a :ref:`service <sky-serve>`'s replica task.
- 1

The values of these variables are filled in by SkyPilot at task execution time.

Expand Down
6 changes: 4 additions & 2 deletions docs/source/serving/update.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ SkyServe supports *updating* a deployed service, which can be used to change:
* Service spec in ``service`` (e.g., number of replicas or autoscaling spec)

During an update, the service will remain accessible with no downtime and its
endpoint will remain the same. By default, `rolling update <rolling-update>`__
is applied, while you can also specify a `blue-green update <blue-green-update>`__.
endpoint will remain the same. By default, :ref:`rolling update <rolling-update>`
is applied, while you can also specify a :ref:`blue-green update <blue-green-update>`.


.. _rolling-update:

Rolling Update
Expand Down
2 changes: 2 additions & 0 deletions sky/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3800,9 +3800,11 @@ def serve_update(
SkyServe will reuse old replicas, if only the service section is changed
and no file mounts are specified.
Otherwise, SkyServe will terminate the old replicas and start new replicas.
Two update modes are supported:
- "rolling": (default) SkyServe will update the service with rolling update,
i.e., it will terminate one old replica whenever one new replica is
ready. Traffic can be mixed on old and new replicas.
Expand Down

0 comments on commit ed5bb75

Please sign in to comment.