Skip to content

[data] Add streaming execution documentation - #33941

Merged
jianoaix merged 19 commits into
ray-project:masterfrom
jianoaix:streamingdoc
Apr 6, 2023
Merged

[data] Add streaming execution documentation#33941
jianoaix merged 19 commits into
ray-project:masterfrom
jianoaix:streamingdoc

Conversation

@jianoaix

@jianoaix jianoaix commented Mar 30, 2023

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Streaming execution will be enabled in 2.4 so we need to have documentation coverage to guide users.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(


This section covers the Datasets execution model and performance considerations.

.. _datasets_lazy_execution:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add/edit this page instead of adding a new page.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread doc/source/data/pipelining-compute.rst Outdated
Comment thread doc/source/data/pipelining-compute.rst Outdated
The DatasetPipeline is expected to be deprecated in Ray 2.5. If your use case doesn't
need per-window shuffle, we recommend using the streaming execution of Dataset. By
setting the resource limits, you can cap the resource usage to run the operations
as the DatasetPipeline window, and achieve even better performance and stability.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resources limits are too much detail to mention here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, dropped.

@ericl ericl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to edit the key concepts page to mention streaming.

@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 30, 2023
@jianoaix jianoaix removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 31, 2023
Comment thread doc/source/data/dataset-internals.rst Outdated

ctx.execution_options.preserve_order = True

To enable deterministic execution, set the above to True. This may decrease performance, but will ensure block ordering is preserved through execution. This flag defaults to True in Ray 2.3 but False in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably simplify to say it defaults to False, since streaming isn't enabled in 2.3 by default.


.. code-block::

ctx.execution_options.actor_locality_enabled = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can note this is enabled by default.

@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 5, 2023

@zhe-thoughts zhe-thoughts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for cherry picking into 2.4.0

@jianoaix jianoaix removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 6, 2023
@jianoaix

jianoaix commented Apr 6, 2023

Copy link
Copy Markdown
Contributor Author

The test failure (https://buildkite.com/ray-project/oss-ci-build-pr/builds/17601#01875443-53d7-48eb-bfcd-f7a48e01bbfd) is not relevant and actually fixed (#34115).

@jianoaix
jianoaix merged commit 968f6e9 into ray-project:master Apr 6, 2023
jianoaix added a commit to jianoaix/ray that referenced this pull request Apr 6, 2023
* Revert "[Datasets] Revert "Enable streaming executor by default (ray-project#32493)" (ray-project#33485)"

This reverts commit 5c79954.

* Add streaming execution documentation

* fix

* feedback

* remove new file

* fix

* fix

* key concept

* fix

* fix

* fix

* wording

* feedback
@zhe-thoughts

Copy link
Copy Markdown
Contributor

Approved for cherry picking into 2.4.0

jianoaix added a commit that referenced this pull request Apr 6, 2023
* Revert "[Datasets] Revert "Enable streaming executor by default (#32493)" (#33485)"

This reverts commit 5c79954.

* Add streaming execution documentation

* fix

* feedback

* remove new file

* fix

* fix

* key concept

* fix

* fix

* fix

* wording

* feedback
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
* Revert "[Datasets] Revert "Enable streaming executor by default (ray-project#32493)" (ray-project#33485)"

This reverts commit 5c79954.

* Add streaming execution documentation

* fix

* feedback

* remove new file

* fix

* fix

* key concept

* fix

* fix

* fix

* wording

* feedback

Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
* Revert "[Datasets] Revert "Enable streaming executor by default (ray-project#32493)" (ray-project#33485)"

This reverts commit 5c79954.

* Add streaming execution documentation

* fix

* feedback

* remove new file

* fix

* fix

* key concept

* fix

* fix

* fix

* wording

* feedback

Signed-off-by: Jack He <jackhe2345@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants