Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Run pre-commit on core docs #47004

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/ray-core/accelerator-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Accelerator Types
Ray supports the following accelerator types:

.. literalinclude:: ../../../python/ray/util/accelerators/accelerators.py
:language: python
:language: python
14 changes: 7 additions & 7 deletions doc/source/ray-core/actors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Use `ray list actors` from :ref:`State API <state-api-overview-ref>` to see acto
Stats:
------------------------------
Total: 1

Table:
------------------------------
ACTOR_ID CLASS_NAME STATE JOB_ID NAME NODE_ID PID RAY_NAMESPACE
Expand Down Expand Up @@ -403,17 +403,17 @@ Cancel Actor Tasks by calling :func:`ray.cancel() <ray.cancel>` on the returned
In Ray, Task cancellation behavior is contingent on the Task's current state:

**Unscheduled Tasks**:
If the Actor Task hasn't been scheduled yet, Ray attempts to cancel the scheduling.
When successfully cancelled at this stage, invoking ``ray.get(actor_task_ref)``
If the Actor Task hasn't been scheduled yet, Ray attempts to cancel the scheduling.
When successfully cancelled at this stage, invoking ``ray.get(actor_task_ref)``
produce a :class:`TaskCancelledError <ray.exceptions.TaskCancelledError>`.

**Running Actor Tasks (Regular Actor, Threaded Actor)**:
For tasks classified as a single-threaded Actor or a multi-threaded Actor,
Ray offers no mechanism for interruption.

**Running Async Actor Tasks**:
For Tasks classified as `async Actors <_async-actors>`, Ray seeks to cancel the associated `asyncio.Task`.
This cancellation approach aligns with the standards presented in
For Tasks classified as `async Actors <_async-actors>`, Ray seeks to cancel the associated `asyncio.Task`.
This cancellation approach aligns with the standards presented in
`asyncio task cancellation <https://docs.python.org/3/library/asyncio-task.html#task-cancellation>`__.
Note that `asyncio.Task` won't be interrupted in the middle of execution if you don't `await` within the async function.

Expand All @@ -424,7 +424,7 @@ the Task might not be cancelled.
You can check if a Task was successfully cancelled using ``ray.get(actor_task_ref)``.

**Recursive Cancellation**:
Ray tracks all child and Actor Tasks. When the``recursive=True`` argument is given,
Ray tracks all child and Actor Tasks. When the ``recursive=True`` argument is given,
it cancels all child and Actor Tasks.

Scheduling
Expand Down Expand Up @@ -466,7 +466,7 @@ define can run. This also implies that tasks are scheduled more flexibly,
and that if you don't need the stateful part of an actor, you're mostly
better off using tasks.

Task Events
Task Events
-----------

By default, Ray traces the execution of actor tasks, reporting task status events and profiling events
Expand Down
6 changes: 3 additions & 3 deletions doc/source/ray-core/actors/terminating-actors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Use `ray list actors --detail` from :ref:`State API <state-api-overview-ref>` to
serialized_runtime_env: '{}'
required_resources: {}
death_cause:
actor_died_error_context: # <---- You could see the error message w.r.t why the actor exits.
actor_died_error_context: # <---- You could see the error message w.r.t why the actor exits.
error_message: The actor is dead because `ray.kill` killed it.
owner_id: 01000000ffffffffffffffffffffffffffffffffffffffffffffffff
owner_ip_address: 127.0.0.1
Expand Down Expand Up @@ -153,7 +153,7 @@ Note that this method of termination waits until any previously submitted
tasks finish executing and then exits the process gracefully with sys.exit.



You could see the actor is dead as a result of the user's `exit_actor()` call:

.. code-block:: bash
Expand Down Expand Up @@ -190,4 +190,4 @@ You could see the actor is dead as a result of the user's `exit_actor()` call:
never_started: false
is_detached: false
placement_group_id: null
repr_name: ''
repr_name: ''
2 changes: 1 addition & 1 deletion doc/source/ray-core/api/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ This section contains commands to enable/disable :ref:`Ray usage stats <ref-usag

.. click:: ray.scripts.scripts:enable_usage_stats
:prog: ray enable-usage-stats
:show-nested:
:show-nested:
4 changes: 2 additions & 2 deletions doc/source/ray-core/doc_code/ray-dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ def __init__(self):
def forward(self, input_data: int):
self.forwarded += 1
return input_data + 1

def num_forwarded(self):
return self.forwarded

# Create an actor via ``remote`` API not ``bind`` API to avoid
# killing actors when a DAG is finished.
worker = Worker.remote()
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ray-core/doc_code/streaming_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def task():
assert len(unready) == 0
next(gen)

# Because the second yield hasn't happened yet,
# Because the second yield hasn't happened yet,
ready, unready = ray.wait([gen], timeout=0)
print("Wait for 0 seconds. The next item is not ready.")
print(ready, unready)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ray-core/examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ filegroup(
name = "core_examples",
srcs = glob(["*.ipynb"]),
visibility = ["//doc:__subpackages__"]
)
)
2 changes: 1 addition & 1 deletion doc/source/ray-core/examples/images/automl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/source/ray-core/examples/images/batch-training.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/source/ray-core/examples/lm/preprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ fairseq-preprocess \
--validpref wikitext-103-raw/wiki.valid.bpe \
--testpref wikitext-103-raw/wiki.test.bpe \
--destdir data-bin/wikitext-103 \
--workers 60
--workers 60
4 changes: 2 additions & 2 deletions doc/source/ray-core/examples/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Beginner
* - :doc:`A Gentle Introduction to Ray Core by Example <gentle_walkthrough>`
* - :doc:`Using Ray for Highly Parallelizable Tasks <highly_parallel>`
* - :doc:`Monte Carlo Estimation of π <monte_carlo_pi>`


Intermediate
------------
Expand All @@ -37,7 +37,7 @@ Advanced
--------

.. list-table::

* - :doc:`Build Simple AutoML for Time Series Using Ray <automl_for_time_series>`
* - :doc:`Build Batch Prediction Using Ray <batch_prediction>`
* - :doc:`Build a Simple Parameter Server Using Ray <plot_parameter_server>`
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ray-core/examples/plot_hyperparameter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
1 change: 0 additions & 1 deletion doc/source/ray-core/fault_tolerance/actors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,3 @@ Retry behavior depends on the value you set ``retry_exceptions`` to:
- The default value,`0`.

For example, if a method sets `max_task_retries=5` and `retry_exceptions=True`, and the actor sets `max_restarts=2`, Ray executes the method up to 6 times: once for the initial invocation, and 5 additional retries. The 6 invocations may include 2 actor crashes. After the 6th invocation, a `ray.get` call to the result Ray ObjectRef raises the exception raised in the last invocation, or `ray.exceptions.RayActorError` if the actor crashed in the last invocation.

2 changes: 1 addition & 1 deletion doc/source/ray-core/fault_tolerance/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Use `ray list tasks` from :ref:`State API CLI <state-api-overview-ref>` to query
.. code-block:: bash

# This API is only available when you download Ray via `pip install "ray[default]"`
ray list tasks
ray list tasks

.. code-block:: bash

Expand Down
2 changes: 1 addition & 1 deletion doc/source/ray-core/images/memory.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/source/ray-core/images/oom_killer_example.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/source/ray-core/images/pong-arch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading