Skip to content

[Data][Docs] Revise "Loading data" - #36144

Merged
amogkam merged 9 commits into
ray-project:masterfrom
bveeramani:loading-data
Jun 8, 2023
Merged

amogkam merged 9 commits into
ray-project:masterfrom
bveeramani:loading-data

Conversation

@bveeramani

@bveeramani bveeramani commented Jun 7, 2023 •

Copy link
Copy Markdown
Member

Why are these changes needed?

The "Loading data" guide contains verbose examples and disorganized subsections. This PR abridges the guide and restructures the content.

Related issue number

Checks

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani bveeramani changed the title Initial commit [Data][Docs] Revise "Loading data" Jun 7, 2023
@amogkam

amogkam commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

Can you add a PR description?

Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Outdated

Create a dataset from a range of integers, packing this integer range into
ndarrays of the provided shape.
ds = ray.data.read_images("/tmp/batoidea/JPEGImages")

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.

just curious, does these directory exist in the CI env?

@bveeramani bveeramani Jun 7, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not yet, but I'm planning on adding it in a follow-up PR. Thinking of download the s3://ray-example-data bucket to CI.

Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
Comment thread doc/source/data/loading-data.rst Resolved
pip install mysql-connector-python

Then, define your connection login and query the database.
Then, define your connection logic and query the database.

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.

IIUC, the following example will create a new connection for each ray.data.read_sql. This is an anti-pattern in practice. Do we want to update it to re-use one connection?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's necessary to create a new connection because connections aren't thread or process safe. So, we can't share a connection across read tasks.

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.

Those read_sql calls are sequential. So multi-threading isn't a problem?

@bveeramani bveeramani Jun 8, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure if I'm misunderstanding? The read_sql calls are sequential, but read_sql creates connections in read tasks. We create a connection in each read task so that we can read the database in parallel.

Co-authored-by: Hao Chen <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Comment thread doc/source/data/loading-data.rst Resolved

@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.

Edits look good, but we also have to somehow retain the performance section. The most common pain point from users is how to obtain good performance from Ray Data, so we have to be deliberate in addressing this need.

@amogkam

amogkam commented Jun 7, 2023 •

Copy link
Copy Markdown
Contributor

For performance, we can just link to the appropriate section in the performance guide in the intro? https://docs.ray.io/en/master/data/performance-tips.html. And make sure that information is up to date.

Don't think we need to have it in both places

@ericl

ericl commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

For performance, we can just link to the appropriate section in the performance guide in the intro? https://docs.ray.io/en/master/data/performance-tips.html. And make sure that information is up to date.

Currently, the performance page is a mis-mash of random / advanced tips. It certainly needs to be updated to focus on the basics for loading / transforming.

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani

Copy link
Copy Markdown
Member Author

For performance, we can just link to the appropriate section in the performance guide in the intro? https://docs.ray.io/en/master/data/performance-tips.html. And make sure that information is up to date.

Currently, the performance page is a mis-mash of random / advanced tips. It certainly needs to be updated to focus on the basics for loading / transforming.

We're planning on revising the performance page in the near future. I'll leave the performance considerations in for now, and remove it once we've revised the performance page.

Signed-off-by: Balaji Veeramani <[email protected]>
Comment thread doc/source/data/loading-data.rst Resolved
@bveeramani bveeramani mentioned this pull request Jun 7, 2023
9 tasks
Signed-off-by: Balaji Veeramani <[email protected]>

@amogkam amogkam 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.

This is great!!

Just last thing, per @ericl's comment let's add a "Creating synthetic datasets" section at the bottom that shows range, range_table, and range_tensor (just like what we have currently), and specifies this is useful for performance benchmarking.

@ericl

ericl commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

As Amog's comment above suggested could we add range() and range_tensor() back as recommendations for creating large synthetic datasets for performance testing?

Signed-off-by: Balaji Veeramani <[email protected]>
@bveeramani

Copy link
Copy Markdown
Member Author

As Amog's comment above suggested could we add range() and range_tensor() back as recommendations for creating large synthetic datasets for performance testing?

@ericl yeah, just pushed the changes.

@amogkam
amogkam merged commit 369f68e into ray-project:master Jun 8, 2023
@bveeramani
bveeramani deleted the loading-data branch June 8, 2023 18:55
amogkam pushed a commit to amogkam/ray that referenced this pull request Jun 8, 2023
The "Loading data" guide contains verbose examples and disorganized subsections. This PR abridges the guide and restructures the content.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Co-authored-by: Hao Chen <[email protected]>
Signed-off-by: amogkam <[email protected]>
amogkam added a commit that referenced this pull request Jun 9, 2023
#35749
#35751
#35753
#35755
#35757
#36018
#36105
#36121
#36144
#36145
#36162
#36124

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: amogkam <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Co-authored-by: angelinalg <[email protected]>
Co-authored-by: Hao Chen <[email protected]>
amogkam added a commit to amogkam/ray that referenced this pull request Jun 9, 2023
amogkam added a commit that referenced this pull request Jun 9, 2023
* [Data] [Docs] Ray Data doc changes for 2.5 (#36224)

#35749
#35751
#35753
#35755
#35757
#36018
#36105
#36121
#36144
#36145
#36162
#36124

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: amogkam <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Co-authored-by: angelinalg <[email protected]>
Co-authored-by: Hao Chen <[email protected]>
maxpumperla added a commit that referenced this pull request Jun 10, 2023
* [Data] [Docs] Ray Data doc changes for 2.5 (#36224)

#35749
#35751
#35753
#35755
#35757
#36018
#36105
#36121
#36144
#36145
#36162
#36124

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: amogkam <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Co-authored-by: angelinalg <[email protected]>
Co-authored-by: Hao Chen <[email protected]>

* [docs] relax kapa loading scheme (#36201)

Signed-off-by: Max Pumperla <[email protected]>

* Revert "[Data] [Docs] Ray Data doc changes for 2.5 (#36224)"

This reverts commit 48a6c26.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: amogkam <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Signed-off-by: Max Pumperla <[email protected]>
Co-authored-by: Amog Kamsetty <[email protected]>
Co-authored-by: Balaji Veeramani <[email protected]>
Co-authored-by: Hao Chen <[email protected]>
Co-authored-by: Max Pumperla <[email protected]>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
The "Loading data" guide contains verbose examples and disorganized subsections. This PR abridges the guide and restructures the content.

---------

Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Co-authored-by: Hao Chen <[email protected]>
Signed-off-by: e428265 <[email protected]>
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.

5 participants