-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
discussionIn a discussion stageIn a discussion stagefeatureIs an improvement or enhancementIs an improvement or enhancement
Description
Proposed refactoring or deprecation
Disable dataloader UserWarning for num_workers=0 since 0 disables multi-process loading (according to pytorch docs it loads in the main process whereas 1 would create a separate process)
Motivation
I understand the motivation behind utilising more processes for data loading but the warning should not appear if the user specifically requested to use the main process (by setting num_workers=0)
Pitch
Change
to
elif 0 < dataloader.num_workers <= 2 < num_cpus and not using_spawn:
rank_zero_warn(
f"The dataloader, {name}, does not have many workers which may be a bottleneck."
" Consider increasing the value of the `num_workers` argument`"
f" (try {num_cpus} which is the number of cpus on this machine)"
" in the `DataLoader` init to improve performance."
)
Programmer-RD-AI, Yevgnen, shchur, zj-zhang, TopCoder2K and 1 more
Metadata
Metadata
Assignees
Labels
discussionIn a discussion stageIn a discussion stagefeatureIs an improvement or enhancementIs an improvement or enhancement