Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different fewshot with and w/o accelerate DDP #1308

Open
baberabb opened this issue Jan 17, 2024 · 1 comment
Open

Different fewshot with and w/o accelerate DDP #1308

baberabb opened this issue Jan 17, 2024 · 1 comment

Comments

@baberabb
Copy link
Contributor

baberabb commented Jan 17, 2024

The fewshot splits are different for the same doc_id when using/not using DDP on accelerate.

@baberabb
Copy link
Contributor Author

baberabb commented Jan 17, 2024

Edit:

The issue is that each DDP process runs its own instance of the rnd. Could have the rnd no longer be stateful and offset the seed by doc_id on each call. But if there's a way to share it across the processes, that would be better.

def sample(self, n):
"""
Draw `n` samples from our fewshot docs. This method should be overridden by subclasses.
"""
return self.rnd.sample(self.docs, n)

@baberabb baberabb changed the title Different fewshot with and w/o accelerate Different fewshot with and w/o accelerate DDP Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant