[Doc] CLI Reference Documentation Revamp (#27862)

Take out the CLI reference from the core API subsection. It follows the same CLI reference pattern as other library (e.g., Serve has Serve CLI under Serve API section).
This commit is contained in:
SangBin Cho 2022-08-19 06:29:31 +09:00 committed by GitHub
parent c2ead88aca
commit 9950e9c1f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 234 additions and 170 deletions

View file

@ -0,0 +1,59 @@
.. _ray-cluster-cli:
Cluster Management CLI
======================
This section contains commands for managing Ray clusters.
.. _ray-start-doc:
.. click:: ray.scripts.scripts:start
:prog: ray start
:show-nested:
.. _ray-stop-doc:
.. click:: ray.scripts.scripts:stop
:prog: ray stop
:show-nested:
.. _ray-up-doc:
.. click:: ray.scripts.scripts:up
:prog: ray up
:show-nested:
.. _ray-down-doc:
.. click:: ray.scripts.scripts:down
:prog: ray down
:show-nested:
.. _ray-exec-doc:
.. click:: ray.scripts.scripts:exec
:prog: ray exec
:show-nested:
.. _ray-submit-doc:
.. click:: ray.scripts.scripts:submit
:prog: ray submit
:show-nested:
.. _ray-attach-doc:
.. click:: ray.scripts.scripts:attach
:prog: ray attach
:show-nested:
.. _ray-get_head_ip-doc:
.. click:: ray.scripts.scripts:get_head_ip
:prog: ray get_head_ip
:show-nested:
.. _ray-monitor-doc:
.. click:: ray.scripts.scripts:monitor
:prog: ray monitor
:show-nested:

View file

@ -0,0 +1,17 @@
.. _cluster-api-ref:
Ray Cluster Management API
==========================
This section contains a reference for the cluster management API. If there is anything missing, please open an issue
on `Github`_.
.. _`GitHub`: https://github.com/ray-project/ray/issues
.. toctree::
:maxdepth: 2
cli.rst
running-applications/job-submission/jobs-package-ref.rst
running-applications/job-submission/cli.rst
running-applications/autoscaling/reference.rst

View file

@ -0,0 +1,40 @@
.. _ray-job-submission-cli-ref:
Ray Job Submission CLI
======================
This section contains commands for the :ref:`Ray Job Submission <jobs-quickstart>`.
.. _ray-job-submit-doc:
.. click:: ray.dashboard.modules.job.cli:submit
:prog: ray job submit
.. warning::
When using the CLI, do not wrap the entrypoint command in quotes. For example, use
``ray job submit --working_dir="." -- python script.py`` instead of ``ray job submit --working_dir="." -- "python script.py"``.
Otherwise you may encounter the error ``/bin/sh: 1: python script.py: not found``.
.. _ray-job-status-doc:
.. click:: ray.dashboard.modules.job.cli:status
:prog: ray job status
:show-nested:
.. _ray-job-stop-doc:
.. click:: ray.dashboard.modules.job.cli:stop
:prog: ray job stop
:show-nested:
.. _ray-job-logs-doc:
.. click:: ray.dashboard.modules.job.cli:logs
:prog: ray job logs
:show-nested:
.. _ray-job-list-doc:
.. click:: ray.dashboard.modules.job.cli:list
:prog: ray job list
:show-nested:

View file

@ -32,5 +32,6 @@ quickstart
sdk
rest
jobs-package-ref
cli
ray-client
```

View file

@ -5,44 +5,7 @@ Ray Job Submission API Reference
For an overview with examples see :ref:`Ray Jobs <jobs-overview>`.
.. _ray-job-submission-cli-ref:
Job Submission CLI
------------------
.. _ray-job-submit-doc:
.. click:: ray.dashboard.modules.job.cli:submit
:prog: ray job submit
.. warning::
When using the CLI, do not wrap the entrypoint command in quotes. For example, use
``ray job submit --working_dir="." -- python script.py`` instead of ``ray job submit --working_dir="." -- "python script.py"``.
Otherwise you may encounter the error ``/bin/sh: 1: python script.py: not found``.
.. _ray-job-status-doc:
.. click:: ray.dashboard.modules.job.cli:status
:prog: ray job status
:show-nested:
.. _ray-job-stop-doc:
.. click:: ray.dashboard.modules.job.cli:stop
:prog: ray job stop
:show-nested:
.. _ray-job-logs-doc:
.. click:: ray.dashboard.modules.job.cli:logs
:prog: ray job logs
:show-nested:
.. _ray-job-list-doc:
.. click:: ray.dashboard.modules.job.cli:list
:prog: ray job list
:show-nested:
For the CLI reference see :ref:`Ray Job Submission CLI Reference <ray-job-submission-cli-ref>`.
.. _ray-job-submission-sdk-ref:

View file

@ -256,5 +256,6 @@ Now let's try it with a runtime environment that pins the version of the ``reque
# Job 'raysubmit_vGGV4MiP9rYkYUnb' succeeded
# ------------------------------------------
The full API reference for the Ray Jobs CLI can be found :ref:`here <ray-job-submission-api-ref>`.
For more information on other ways to submit Ray Jobs, check out the guides for :ref:`programmatic job submission <ray-job-sdk>` and :ref:`job submission using REST <ray-job-rest-api>`.
- The full API reference for the Ray Jobs CLI can be found :ref:`here <ray-job-submission-cli-ref>`.
- The full API reference for the Ray Jobs SDK can be found :ref:`here <ray-job-submission-api-ref>`.
- For more information on other ways to submit Ray Jobs, check out the guides for :ref:`programmatic job submission <ray-job-sdk>` and :ref:`job submission using REST <ray-job-rest-api>`.

View file

@ -202,7 +202,7 @@ A minimal sample cluster configuration file looks as follows:
Save this configuration file as ``config.yaml``. You can specify a lot more details in the configuration file: instance types to use, minimum and maximum number of workers to start, autoscaling strategy, files to sync, and more. For a full reference on the available configuration properties, please refer to the :ref:`cluster YAML configuration options reference <cluster-config>`.
After defining our configuration, we will use the Ray cluster launcher to start a cluster on the cloud, creating a designated "head node" and worker nodes. To start the Ray cluster, we will use the :ref:`Ray CLI <ray-cli>`. Run the following command:
After defining our configuration, we will use the Ray cluster launcher to start a cluster on the cloud, creating a designated "head node" and worker nodes. To start the Ray cluster, we will use the :ref:`Ray CLI <ray-cluster-cli>`. Run the following command:
.. code-block:: shell

View file

@ -3,7 +3,7 @@
Cluster YAML Configuration Options
==================================
The cluster configuration is defined within a YAML file that will be used by the Cluster Launcher to launch the head node, and by the Autoscaler to launch worker nodes. Once the cluster configuration is defined, you will need to use the :ref:`Ray CLI <ray-cli>` to perform any operations such as starting and stopping the cluster.
The cluster configuration is defined within a YAML file that will be used by the Cluster Launcher to launch the head node, and by the Autoscaler to launch worker nodes. Once the cluster configuration is defined, you will need to use the :ref:`Ray CLI <ray-cluster-cli>` to perform any operations such as starting and stopping the cluster.
Syntax
------

View file

@ -0,0 +1,53 @@
Ray Core CLI
============
.. _ray-cli:
Debugging applications
----------------------
This section contains commands for inspecting and debugging the current cluster.
.. _ray-stack-doc:
.. click:: ray.scripts.scripts:stack
:prog: ray stack
:show-nested:
.. _ray-memory-doc:
.. click:: ray.scripts.scripts:memory
:prog: ray memory
:show-nested:
.. _ray-timeline-doc:
.. click:: ray.scripts.scripts:timeline
:prog: ray timeline
:show-nested:
.. _ray-status-doc:
.. click:: ray.scripts.scripts:status
:prog: ray status
:show-nested:
.. click:: ray.scripts.scripts:debug
:prog: ray debug
:show-nested:
Usage Stats
-----------
This section contains commands to enable/disable :ref:`Ray usage stats <ref-usage-stats>`.
.. _ray-disable-usage-stats-doc:
.. click:: ray.scripts.scripts:disable_usage_stats
:prog: ray disable-usage-stats
:show-nested:
.. _ray-enable-usage-stats-doc:
.. click:: ray.scripts.scripts:enable_usage_stats
:prog: ray enable-usage-stats
:show-nested:

View file

@ -234,101 +234,9 @@ Debugging APIs
.. autofunction:: ray.util.inspect_serializability
.. _ray-cli:
.. toctree::
:maxdepth: 2
The Ray Command Line API
------------------------
.. _ray-start-doc:
.. click:: ray.scripts.scripts:start
:prog: ray start
:show-nested:
.. _ray-stop-doc:
.. click:: ray.scripts.scripts:stop
:prog: ray stop
:show-nested:
.. _ray-up-doc:
.. click:: ray.scripts.scripts:up
:prog: ray up
:show-nested:
.. _ray-down-doc:
.. click:: ray.scripts.scripts:down
:prog: ray down
:show-nested:
.. _ray-exec-doc:
.. click:: ray.scripts.scripts:exec
:prog: ray exec
:show-nested:
.. _ray-submit-doc:
.. click:: ray.scripts.scripts:submit
:prog: ray submit
:show-nested:
.. _ray-attach-doc:
.. click:: ray.scripts.scripts:attach
:prog: ray attach
:show-nested:
.. _ray-get_head_ip-doc:
.. click:: ray.scripts.scripts:get_head_ip
:prog: ray get_head_ip
:show-nested:
.. _ray-stack-doc:
.. click:: ray.scripts.scripts:stack
:prog: ray stack
:show-nested:
.. _ray-memory-doc:
.. click:: ray.scripts.scripts:memory
:prog: ray memory
:show-nested:
.. _ray-timeline-doc:
.. click:: ray.scripts.scripts:timeline
:prog: ray timeline
:show-nested:
.. _ray-status-doc:
.. click:: ray.scripts.scripts:status
:prog: ray status
:show-nested:
.. _ray-monitor-doc:
.. click:: ray.scripts.scripts:monitor
:prog: ray monitor
:show-nested:
.. click:: ray.scripts.scripts:debug
:prog: ray debug
:show-nested:
.. _ray-disable-usage-stats-doc:
.. click:: ray.scripts.scripts:disable_usage_stats
:prog: ray disable-usage-stats
:show-nested:
.. _ray-enable-usage-stats-doc:
.. click:: ray.scripts.scripts:enable_usage_stats
:prog: ray enable-usage-stats
:show-nested:
cli.rst
../ray-observability/state/cli.rst
../ray-observability/state/ray-state-api-reference.rst

View file

@ -0,0 +1,45 @@
Ray State CLI
=============
.. _state-api-cli-ref:
State
-----
This section contains commands to access the :ref:`live state of Ray resources (actor, task, object, etc.) <state-api-overview-ref>`.
.. note::
APIs are :ref:`alpha <api-stability-alpha>`. This feature requires a full installation of Ray using ``pip install "ray[default]"``.
State CLI allows users to access the state of various resources (e.g., actor, task, object).
.. click:: ray.experimental.state.state_cli:task_summary
:prog: ray summary tasks
.. click:: ray.experimental.state.state_cli:actor_summary
:prog: ray summary actors
.. click:: ray.experimental.state.state_cli:object_summary
:prog: ray summary objects
.. click:: ray.experimental.state.state_cli:ray_list
:prog: ray list
.. click:: ray.experimental.state.state_cli:ray_get
:prog: ray get
.. _ray-logs-api-cli-ref:
Log
---
This section contains commands to :ref:`access logs <state-api-log-doc>` from Ray clusters.
.. note::
APIs are :ref:`alpha <api-stability-alpha>`. This feature requires a full installation of Ray using ``pip install "ray[default]"``.
Log CLI allows users to access the log from the cluster.
Note that only the logs from alive nodes are available through this API.
.. click:: ray.scripts.scripts:ray_logs
:prog: ray logs

View file

@ -7,36 +7,9 @@ Ray State API
APIs are :ref:`alpha <api-stability-alpha>`. This feature requires a full installation of Ray using ``pip install "ray[default]"``.
State CLI
---------
For an overview with examples see :ref:`Monitoring Ray States <state-api-overview-ref>`.
State CLI allows users to access the state of various resources (e.g., actor, task, object).
.. click:: ray.experimental.state.state_cli:task_summary
:prog: ray summary tasks
.. click:: ray.experimental.state.state_cli:actor_summary
:prog: ray summary actors
.. click:: ray.experimental.state.state_cli:object_summary
:prog: ray summary objects
.. click:: ray.experimental.state.state_cli:ray_list
:prog: ray list
.. click:: ray.experimental.state.state_cli:ray_get
:prog: ray get
.. _ray-logs-api-doc:
Log CLI
-------
Log CLI allows users to access the log from the cluster.
Note that only the logs from alive nodes are available through this API.
.. click:: ray.scripts.scripts:ray_logs
:prog: ray logs
For the CLI reference see :ref:`Ray State CLI Reference <state-api-cli-ref>` or :ref:`Ray Log CLI Reference <ray-logs-api-cli-ref>`.
State Python SDK
-----------------

View file

@ -417,6 +417,8 @@ E.g., Get a node info
Logs
----
.. _state-api-log-doc:
State API also allows you to conveniently access ray logs. Note that you cannot access the logs from a dead node.
By default, the API prints log from a head node.
@ -537,4 +539,6 @@ Or it cleans up the FINISHED state of tasks when its lineage goes out of scope.
API Reference
-------------
See :ref:`State API Reference <state-api-ref>`.
- For the CLI Reference, see :ref:`State CLI Refernece <state-api-cli-ref>`.
- For the SDK Reference, see :ref:`State API Reference <state-api-ref>`.
- For the Log CLI Reference, see :ref:`Log CLI Reference <ray-logs-api-cli-ref>`.

View file

@ -12,5 +12,5 @@ API References
../serve/package-ref.rst
../rllib/package_ref/index.rst
../workflows/package-ref.rst
../cluster/package-overview.rst
../ray-core/package-ref.rst
../ray-observability/state/ray-state-api-reference.rst