Skip to content

Commit

Permalink
[Doc] [Jobs] Add more links to remote port forwarding setup (#44484)
Browse files Browse the repository at this point in the history
ray dashboard must be run to set up port forwarding before the Ray Dashboard can be used for REST APIs like the Ray Jobs API. This is described in a docs section, but the section isn't linked to from all the relevant places. This PR adds some links to it from the Job SDK doc, to help reduce user confusion.

---------

Signed-off-by: Archit Kulkarni <[email protected]>
  • Loading branch information
architkulkarni committed Apr 5, 2024
1 parent 9693fa8 commit 2079472
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ Let's start with a sample script that can be run locally. The following script u
ray.init()
print(ray.get(hello_world.remote()))
SDK calls are made via a ``JobSubmissionClient`` object. To initialize the client, provide the Ray cluster head node address and the port used by the Ray Dashboard (``8265`` by default). For this example, we'll use a local Ray cluster, but the same example will work for remote Ray cluster addresses.
SDK calls are made via a ``JobSubmissionClient`` object. To initialize the client, provide the Ray cluster head node address and the port used by the Ray Dashboard (``8265`` by default). For this example, we'll use a local Ray cluster, but the same example will work for remote Ray cluster addresses; see
:ref:`Using a Remote Cluster <jobs-remote-cluster>` for details on setting up port forwarding.

.. code-block:: python
from ray.job_submission import JobSubmissionClient
# If using a remote cluster, replace 127.0.0.1 with the head node's IP address.
# If using a remote cluster, replace 127.0.0.1 with the head node's IP address or set up port forwarding.
client = JobSubmissionClient("http:https://127.0.0.1:8265")
job_id = client.submit_job(
# Entrypoint shell command to execute
Expand Down Expand Up @@ -246,4 +247,4 @@ The ``verify`` parameter can be set to override this behavior. For example:
client = JobSubmissionClient("https://<job-server-url>", verify="/path/to/cert.pem")
will use the certificate found at ``/path/to/cert.pem`` to verify the job server's certificate.
Certificate verification can be disabled by setting the ``verify`` parameter to ``False``.
Certificate verification can be disabled by setting the ``verify`` parameter to ``False``.

0 comments on commit 2079472

Please sign in to comment.