-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[GraphBolt] gb.DataLoader
can simply be a datapipe.
#7732
Conversation
To trigger regression tests:
|
[5, 0], | ||
[5, 0], | ||
[3, 3], | ||
[5, 5], |
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.
why the expected results are changed?
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 guess torch.utils.data.DataLoader
does things that we don't know about if simply inheriting from it has side effects.
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 code is here, it is quite long so we need good justification to keep deriving from it. https://github.com/pytorch/pytorch/blob/main/torch/utils/data/dataloader.py
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.
This is weird, it seems that the seed is respected in a different way.
@frozenbugs this is a small PR that can potentially affect performance slightly (The less code we run, the potential to become faster.). Do you want to take a quick look as well? |
Description
There is no need to derive from DataLoader as we are not using any of its functionalities.
I also remove some datapipe modification only meant for
num_workers>0
to aif num_workers > 0:
branch.Checklist
Please feel free to remove inapplicable items for your PR.
Changes