-
Notifications
You must be signed in to change notification settings - Fork 328
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
Support PyTorch Dataset for oscar #2246
Conversation
Try to use mars dataset in Before Mars 0.7, we have a concept called But we don't like the concept because, the named tensor/df has no difference with the vanilla one except adding a name, but we have to add more APIs, and maybe for In conclusion, we need a new way to pass Mars objects between driver and pytorch script.
import mars.dataframe as md
from mars.remote import run_script
df = md.read_xxx()
run_script('/to/path/script.py', inputs=[df])
from mars import get_context
df = get_context().get_inputs()[0]
# other parts
Updated: see #2251. |
#2251 has been merged to master branch, now could leverage it to support PyTorch dataset API. |
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.
I left some comments.
add zh_CN doc, add type_check in dataset and other modification
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
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
Congrats that this PR got merged, look forward to seeing more contributions from you. |
(cherry picked from commit 0c9114d)
What do these changes do?
I have done a demo of pytorch dataset API by inheriting torch.utils.data.Dataset. I also write some testcase in tests subfolder.
Related issue number#2224
I have try transfer a torch dataloader object to torch script but I have no idea how to do it. Now I am reading raySGD code to find a way to help mars to run torch or tf code more flexible.