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] [Docs] Docs for working with PyTorch #36880

Merged
merged 18 commits into from
Jun 30, 2023
Prev Previous commit
Next Next commit
clarify schema
Signed-off-by: amogkam <amogkamsetty@yahoo.com>
  • Loading branch information
amogkam committed Jun 28, 2023
commit 00ac7d75414457d036b5899d9c5925a5ded60496
8 changes: 6 additions & 2 deletions doc/source/data/working-with-pytorch.rst
Original file line number Diff line number Diff line change
@@ -356,11 +356,15 @@ If you are using built-in PyTorch datasets, for example from `torchvision`, thes

mnist = torchvision.datasets.MNIST(root="/tmp/", download=True)
ds = ray.data.from_torch(mnist)

# The data for each item of the torch dataset is under the "item" key.
print(ds.schema())

.. testoutput::
:hide:

...
Column Type
------ ----
item <class 'object'>

Custom PyTorch Datasets
~~~~~~~~~~~~~~~~~~~~~~~