Skip to content

Fixing shuffle argument for distributed sampler in core.py#1518

Merged
mravanelli merged 1 commit into
speechbrain:developfrom
RuABraun:fix/dist-sampler-shuffle
Jul 26, 2022
Merged

Fixing shuffle argument for distributed sampler in core.py#1518
mravanelli merged 1 commit into
speechbrain:developfrom
RuABraun:fix/dist-sampler-shuffle

Conversation

@RuABraun

Copy link
Copy Markdown
Collaborator

Currently shuffling of the sample indices is not done before distributing the indices across nodes, this means the distribution will be the same for each epoch. This causes a small but noticeable decrease in performance.

Fixes #1495

I don't think there's ever a reason to have it set to False, therefore hardcoded to True.

I also took the liberty of adding a tiny bit of extra info to why DistributedSamplerWrapper needs to exist.

@TParcollet TParcollet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@TParcollet

Copy link
Copy Markdown
Collaborator

If the tests pass, we can merge @RuABraun

@mravanelli mravanelli merged commit 40fd44a into speechbrain:develop Jul 26, 2022
@anautsch anautsch mentioned this pull request Nov 28, 2022
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

Successfully merging this pull request may close these issues.

make_dataloader always sets shuffle=False when DistributedSampler is employed.

3 participants