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

Automate choosing sampler #927

Closed
williamFalcon opened this issue Feb 24, 2020 · 1 comment · Fixed by #926
Closed

Automate choosing sampler #927

williamFalcon opened this issue Feb 24, 2020 · 1 comment · Fixed by #926
Assignees
Labels
feature Is an improvement or enhancement help wanted Open to be worked on

Comments

@williamFalcon
Copy link
Contributor

🚀 Feature

Let's automate choosing the sampler.

Case 1 (DDP, training):
Default to distributedSampler

sampler = DistributedSampler(dataset)

Case 2 (training):

sampler = RandomSampler(dataset)

Case 3 (val, test):

sampler = SequentialSampler(dataset)

Case 4 (tpu, train, val, test):

xm.DistributedSampler(dataset)

Motivation

Samplers are hard and should be automated.

@srush

@williamFalcon williamFalcon added feature Is an improvement or enhancement help wanted Open to be worked on labels Feb 24, 2020
@williamFalcon williamFalcon self-assigned this Feb 24, 2020
@srush
Copy link
Contributor

srush commented Feb 24, 2020

I don't know if it is possible, but it would also be great is TPU Test at least could somehow be sequential. In NLP it is common just to print out the test results to a file and use an external script for final eval. Having them in order is nice (alternatively I guess id's could be threaded through and sorted.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Is an improvement or enhancement help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants