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

[Data] Fix read_tfrecords() docstring to display tfx-bsl tip #46717

Merged
merged 4 commits into from
Jul 22, 2024
Merged
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
15 changes: 8 additions & 7 deletions python/ray/data/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1708,13 +1708,14 @@ def read_tfrecords(
`tf.train.Example <https://www.tensorflow.org/api_docs/python/tf/train/Example>`_
messages.

.. info:
Using tfx-bsl for reading tfrecord files is prefered, When reading large
datasets in production use cases. To use this implementation you should
install tfx-bsl with:
1. `pip install tfx_bsl --no-dependencies`
2. Pass tfx_read_options to read_tfrecords, for example:
`ds = read_tfrecords(path, ..., tfx_read_options=TFXReadOptions())`
.. tip::
Using the ``tfx-bsl`` library is more performant when reading large
datasets (for example, in production use cases). To use this
implementation, you must first install ``tfx-bsl``:

1. `pip install tfx_bsl --no-dependencies`
2. Pass tfx_read_options to read_tfrecords, for example:
`ds = read_tfrecords(path, ..., tfx_read_options=TFXReadOptions())`

.. warning::
This function exclusively supports ``tf.train.Example`` messages. If a file
Expand Down