Skip to content

parallelization torch distributed #57

Closed Answered by kristian-georgiev
JD-ETH asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JD-ETH. Indeed, we've mostly been doing parallelization by checkpoints and this is what we include in all examples. It should be fairly straightforward to parallelize over dataloaders. Using DDP, I would just make the data indices part of the batch, and then you can run featurize and score with the optional inds argument instead of num_samples (check, e..g, https://trak.readthedocs.io/en/latest/trak.html#trak.traker.TRAKer.featurize). I believe this is the same approach as the "global indices" you suggest :)

The above solution should work out of the box. If it indeed does work, an example outlining how to use DDP will be greatly appreciated :)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kristian-georgiev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants