Distributed Learning with Queue and pytorch-lightning #1096
Replies: 2 comments 1 reply
-
|
Thanks @nicoloesch for opening the discussion and especially for sharing your findings in the note! Pinging @hsyang1222 in case he has any comments. |
Beta Was this translation helpful? Give feedback.
-
|
Q. Does the Queue require the DistributedSampler in the case of DDP, if the overarching DataLoader encompassing the torchio.Queue is already "equipped" with it? I am going to implement pytorch-lightining-support DDP dataloader in torchio.Queue. When I done, I will notice you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I am currently preparing my model and my data loading for DDP. Luckily, this is rather straight-forward in
pytorch-lightning. However, I stumbled upon a mismatch between the functionality ofpytorch-lightningand theQueuew.r.t. toDistributedSampler.The documentation of
pytorch-lightningmentions the following:Under the hood, they reinstantiate the
Dataloaderwith theDistributedSamplerautomatically meaning that theDataLoaderhas now the respective sampler and all other attributes as well.However, in the documentation of the
torchio.Queue. it is mentioned that the Queue requires theDistributedSamplerin the case of DDP.My question now is the following: Does the
Queuerequire theDistributedSamplerin the case of DDP, if the overarchingDataLoaderencompassing thetorchio.Queueis already "equipped" with it? Or should I instantiate it twice (once myself and once automatically bypytorch-lightning), which I feel is probably not the right approach for it?I tried to follow the path of the respective
DistributedSamplers andDataLoaders but my knowledge about data loading reached its limit, so I am seeking for advise from someone who has more experience in this!Thank you in advance for your help!
Nico
Edit
It appears that the
pytorch_lightning.Trainerhas the flaguse_distributed_sampler, which determines if the respectiveDataLoadershould be wrapped or not. As a result, I will continue with setting this toFalseand use theDistributedSamplerin thetorchio.Queueas required!Beta Was this translation helpful? Give feedback.
All reactions