Skip to content

TOR401 give more context on what to set num_workers #96

Open
@jamesbraza

Description

@jamesbraza

I am seeing this TOR401 error message as of TorchFix==0.7.0:

TOR401 Detected DataLoader running with synchronized implementation. Please enable asynchronous dataloading by setting num_workers > 0 when initializing DataLoader.

For reference, from https://github.com/pytorch/pytorch/blob/v2.6.0/torch/utils/data/dataloader.py#L153-L155:

num_workers (int, optional): how many subprocesses to use for data loading. 0 means that the data will be loaded in the main process.

Can you expand this TOR401 error message (or add TOR401 docs) advising what to set num_workers? Is a generally useful to set it to 1, or to cpu_count?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions