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

DataLoader Length Fix #1718

Merged
merged 9 commits into from
Jun 16, 2022
Merged

DataLoader Length Fix #1718

merged 9 commits into from
Jun 16, 2022

Conversation

Sanger2000
Copy link
Contributor

DeepSpeedDataLoader currently has a length equal to the length of the dataset passed in. I made a small change such that its length is equal to the number of batches in the data loader (the same way it is done in pytorch).

An alternative change could be to set the length equal to len(self.data) after self._create_dataloader() is called.

@rocm-mici
Copy link

Can one of the admins verify this patch?

@Sanger2000
Copy link
Contributor Author

It's a pretty minor change, but let me know if it makes sense.

Copy link
Collaborator

@jeffra jeffra left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for the contribution!

@jeffra jeffra merged commit ae198e2 into microsoft:master Jun 16, 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.

3 participants