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

Make shuffle compatible with temp_seed #640

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Sep 18, 2020

This code used to return different dataset at each run

import dataset as ds

dataset = ...

with ds.temp_seed(42):
    shuffled = dataset.shuffle()

Now it returns the same one since the seed is set

Copy link
Member

@thomwolf thomwolf left a comment

Choose a reason for hiding this comment

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

Nice!

@lhoestq lhoestq merged commit 116bc31 into master Sep 18, 2020
@lhoestq lhoestq deleted the make-shuffle-compatible-with-temp_seed branch September 18, 2020 11:47
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.

None yet

2 participants