Skip to content

[Data] Fix Ragged Tensor Documentation - #33029

Merged
amogkam merged 3 commits into
ray-project:masterfrom
amogkam:ragged-to-tf
Mar 7, 2023
Merged

[Data] Fix Ragged Tensor Documentation#33029
amogkam merged 3 commits into
ray-project:masterfrom
amogkam:ragged-to-tf

Conversation

@amogkam

@amogkam amogkam commented Mar 4, 2023

Copy link
Copy Markdown
Contributor

Closes #33005

  1. Updates ragged tensor documentation to use latest to_tf API
  2. Adds support for automatic tensor casting to from_pandas API
  3. Tests all code snippets in Dataset Tensor Support documentation

Why are these changes needed?

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 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 :(

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: amogkam <amogkamsetty@yahoo.com>

@bveeramani bveeramani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread doc/BUILD
Signed-off-by: amogkam <amogkamsetty@yahoo.com>

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

Nice! All of the changes LGTM

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

LGTM

@amogkam
amogkam merged commit 552bbcf into ray-project:master Mar 7, 2023
@amogkam
amogkam deleted the ragged-to-tf branch March 7, 2023 02:40
ArturNiederfahrenhorst added a commit that referenced this pull request Mar 8, 2023
amogkam added a commit that referenced this pull request Mar 8, 2023
… of from_pandas (#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request Mar 21, 2023
Closes ray-project#33005

Updates ragged tensor documentation to use latest to_tf API
Adds support for automatic tensor casting to from_pandas API
Tests all code snippets in Dataset Tensor Support documentation

---------

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: Jack He <jackhe2345@gmail.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request Mar 21, 2023
… of from_pandas (ray-project#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

ray-project#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.

Signed-off-by: Jack He <jackhe2345@gmail.com>
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
Closes ray-project#33005

Updates ragged tensor documentation to use latest to_tf API
Adds support for automatic tensor casting to from_pandas API
Tests all code snippets in Dataset Tensor Support documentation

---------

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
… of from_pandas (ray-project#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

ray-project#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request Mar 22, 2023
Closes ray-project#33005

Updates ragged tensor documentation to use latest to_tf API
Adds support for automatic tensor casting to from_pandas API
Tests all code snippets in Dataset Tensor Support documentation

---------

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request Mar 22, 2023
… of from_pandas (ray-project#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

ray-project#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
Closes ray-project#33005

Updates ragged tensor documentation to use latest to_tf API
Adds support for automatic tensor casting to from_pandas API
Tests all code snippets in Dataset Tensor Support documentation

---------

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: elliottower <elliot@elliottower.com>
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
… of from_pandas (ray-project#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

ray-project#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.

Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
Closes ray-project#33005

Updates ragged tensor documentation to use latest to_tf API
Adds support for automatic tensor casting to from_pandas API
Tests all code snippets in Dataset Tensor Support documentation

---------

Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: Jack He <jackhe2345@gmail.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
… of from_pandas (ray-project#33132)

Signed-off-by: amogkam <amogkamsetty@yahoo.com>

ray-project#33029 added automatic tensor extension casting for the pandas API. However, tensor extension casting is in-place, so it would modify the source dataframe, if the users want to use in downstream tasks.

We instead copy() the source dataframe before casting to TensorArray, so the source dataframes are not affected.

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.

[Data] Ragged tensor docs for DatasetIterator.to_tf show outdated (removed) APIs

5 participants