-
Notifications
You must be signed in to change notification settings - Fork 11
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
Override num_workers
from 0 to 1 in get_pytorch_dataloader
#330
Override num_workers
from 0 to 1 in get_pytorch_dataloader
#330
Conversation
This pull request was exported from Phabricator. Differential Revision: D68357865 |
raise ValueError(f"`num_workers` must be greater than 0. Found: {num_workers}") | ||
elif num_workers == 0: | ||
_LG.warning( |
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.
Could you use warnings.warn
with stack_level=2
?
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 a good explanation of which one to use.
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.
Thanks for the resource! I just updated the code to reflect this
…ookresearch#330) Summary: To support a similar interface to the pytorch dataloader, we set `num_workers` to 1 if the input `num_workers` is 0 in `get_pytorch_dataloader` Differential Revision: D68357865
2cdaf42
to
a32ac35
Compare
This pull request was exported from Phabricator. Differential Revision: D68357865 |
…ookresearch#330) Summary: To support a similar interface to the pytorch dataloader, we set `num_workers` to 1 if the input `num_workers` is 0 in `get_pytorch_dataloader` Differential Revision: D68357865
a32ac35
to
7c39d28
Compare
This pull request was exported from Phabricator. Differential Revision: D68357865 |
Looks good. Thanks. |
…ookresearch#330) Summary: To support a similar interface to the pytorch dataloader, we set `num_workers` to 1 if the input `num_workers` is 0 in `get_pytorch_dataloader` Reviewed By: moto-meta Differential Revision: D68357865
7c39d28
to
f7892fa
Compare
This pull request was exported from Phabricator. Differential Revision: D68357865 |
…ookresearch#330) Summary: To support a similar interface to the pytorch dataloader, we set `num_workers` to 1 if the input `num_workers` is 0 in `get_pytorch_dataloader` Reviewed By: moto-meta Differential Revision: D68357865
f7892fa
to
51da1b2
Compare
This pull request was exported from Phabricator. Differential Revision: D68357865 |
ca1389a
into
facebookresearch:main
Summary: To support a similar interface to the pytorch dataloader, we set
num_workers
to 1 if the inputnum_workers
is 0 inget_pytorch_dataloader
Differential Revision: D68357865