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

Fix number of examples for iterable dataset in distributed training #17951

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Jun 29, 2022

What does this PR do?

As pointed out in #17913, when training in distributed mode with iterable datasets, the number of examples displayed is wrong. This is because we need to go grab the length of the underlying dataset of the IterableDatasetShard, not the length of the IterableDatasetShard itself.

Fixes #17913

@sgugger sgugger requested a review from LysandreJik June 29, 2022 18:11
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 29, 2022

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

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thanks for fixing that!

@sgugger sgugger merged commit f25457b into main Jun 30, 2022
@sgugger sgugger deleted the num_examples_iter branch June 30, 2022 15:01
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.

"num_examples" incorrect when using IterableDataset
3 participants