Closed
Description
I've been trying to create a VideoClips object from a very large dataset, however during the process my system restarts for some unknown reason.
After looking in here I figured out that I never get into the loop (line 85).
Running torch.get_num_threads()
gives me 44, so I changed this to 16 manually and it works fine now.
import torch.utils.data
dl = torch.utils.data.DataLoader(
DS(self.video_paths),
batch_size=16,
num_workers=torch.get_num_threads(), # changed this to 16
collate_fn=lambda x: x)
I think it would be better to let the user choose the num_workers parameter by passing it to VideoClips constructor.