-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Datasets] Improve to_tf
docstring
#29464
Conversation
Co-authored-by: Clark Zinzow <[email protected]> Signed-off-by: Balaji Veeramani <[email protected]>
python/ray/data/dataset.py
Outdated
If your dataset contains ragged tensors, this method errors. To prevent | ||
errors, resize tensors or | ||
:ref:`disable tensor extension casting <disable_tensor_extension_casting>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only blocker for this is that schema inference breaks for ragged tensors; IMO we should provide an optional output_signature
argument that bypasses schema inference (I think this is a generically good thing to have), at which point ragged tensors would currently be supported via specifying an output_signature
with the appropriate ragged tensor spec.
disable tensor extension casting
For .to_tf()
, I don't think that ragged tensors will work, even with tensor extension casting disabled. I think the only route is resizing the tensors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#29476 adds support for ragged tensors and removes this warning.
Signed-off-by: Balaji Veeramani <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The `Dataset.to_tf` docstring is out-of-date, and it doesn't contain examples. This PR updates the docstring content and adds docstring examples. Signed-off-by: Balaji Veeramani <[email protected]> Co-authored-by: Clark Zinzow <[email protected]> Signed-off-by: Weichen Xu <[email protected]>
Signed-off-by: Balaji [email protected]
Depends on:
str
exclude
#29443Why are these changes needed?
The
Dataset.to_tf
docstring is out-of-date, and it doesn't contain examples. This PR updates the docstring content and adds docstring examples.Related issue number
See #29028
Closes #29202
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.