Skip to content

Conversation

@georgeSkoumas
Copy link
Contributor

This PR removes row shuffling and only keeps batch shuffling on the Datapipe object via the use of datapipe.shuffle functionality.

@georgeSkoumas georgeSkoumas requested a review from ktsitsi April 18, 2023 14:55
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #27742: Pytorch slower with higher num_workers.

Copy link
Collaborator

@ktsitsi ktsitsi left a comment

Choose a reason for hiding this comment

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

LGTM Feel free to merge after comment.

shuffle_buffer_size=shuffle_buffer_size,
batch_size=batch_size,
num_workers=num_workers,
persistent_workers=True,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we avoid duplication here?

dataloader = PyTorchTileDBDataLoader(
                        *all_array_params,
                        shuffle_buffer_size=shuffle_buffer_size,
                        batch_size=batch_size,
                        num_workers=num_workers,
                        persistent_workers=True if num_workers > 0 else False

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we can. Will fix this.

@georgeSkoumas georgeSkoumas merged commit 858177a into master Apr 18, 2023
@georgeSkoumas georgeSkoumas deleted the gsk/sc-27742/improve_pytorch_performance_with_multiple_workers_and_suffling branch April 18, 2023 17:09
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