ray/doc/source/ray-core/tasks/patterns/index.rst
Stephanie Wang ab8785ca5c
Revert "Revert "[core] Support generators for tasks with multiple return values (#25247)" (#25380)" (#25383)
Duplicate for #25247.

Adds a fix for Dask-on-Ray. Previously, for tasks with multiple return values, we implicitly allowed returning a dict with the return index as the key. This was used by Dask-on-Ray, but this is not documented behavior, and we now require task returns to be iterable instead.
2022-06-02 10:50:11 -07:00

27 lines
692 B
ReStructuredText

.. _task-patterns:
Task Design Patterns
====================
This section is a collection of common design patterns (and anti-patterns) for Ray tasks. It is meant as a handbook for both:
- New users trying to understand how to get started with Ray, and
- Advanced users trying to optimize their use of Ray tasks
You may also be interested in visiting the design patterns section for :ref:`actors <actor-patterns>`.
.. toctree::
:maxdepth: -1
tree-of-tasks
map-reduce
limit-tasks
generators
closure-capture
fine-grained-tasks
global-variables
ray-get-loop
submission-order
too-many-results
redefine-task-actor-loop
unnecessary-ray-get