How to properly split train/val/test sets when using DDP and multiple GPUs #13343
-
I trained a model using a single GPU. Now I am trying to use 4 GPUs and DDP. The problem is that the code seems to be executed 4 times, making the datasets split into training, validation, and test sets invalid. For example, suppose I have 4 records with IDs
How do you suggest to fix this? How can I run the "splitting" only once? I'd like the fact that every time that I execute the code I get a different splits. I just want the splits to be consistent across all the GPUs. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
did you set |
Beta Was this translation helpful? Give feedback.
did you set
seed_everything(seed)
at the beginning of your main?