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 optional #457

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Make shuffle optional #457

merged 1 commit into from
Jun 23, 2023

Conversation

lopez-hector
Copy link
Contributor

Added parameter that allows you to turn off shuffling.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 23, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thank you for your great suggestion!
Let's put the default to False to avoid breaking changes for users. What do you think ?

@@ -187,6 +187,8 @@ class ConstantLengthDataset(IterableDataset):
Number of characters per token used to estimate number of tokens in text buffer.
eos_token_id (`int`, *optional*, defaults to `0`):
Id of the end of sequence token if the passed tokenizer does not have an EOS token.
shuffle ('bool', *optional*, defaults to True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
shuffle ('bool', *optional*, defaults to True)
shuffle ('bool', *optional*, defaults to `False`)

@@ -200,6 +202,7 @@ def __init__(
num_of_sequences=1024,
chars_per_token=3.6,
eos_token_id=0,
shuffle=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
shuffle=True,
shuffle=False,

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Sorry Ignore my comments, this looks great to me

@younesbelkada younesbelkada merged commit 0161a8e into huggingface:main Jun 23, 2023
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.

3 participants