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

Remove duplicate code and check the remainder only once #1717

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

muellerzr
Copy link
Collaborator

Second part of a followup from #1709, given a dataloader never really should change its remainder after iterating, the remainder isn't re-set after the end of an __iter__, nor is it recalculated during an __iter__. Instead we check for the default (-1), then recalculate.

@muellerzr muellerzr requested a review from sgugger July 12, 2023 15:44
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

LGTM!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 12, 2023

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

@muellerzr muellerzr merged commit e8c64f5 into main Jul 12, 2023
26 checks passed
@muellerzr muellerzr deleted the remainder branch July 12, 2023 18:22
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