Why the seemingly repetitive code in DeepSpeedDataLoader?
#4811
litaochenbit
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was going through the code of
DeepSpeedDataLoaderand noticed that theDataLoaderconstuctor are called seperately to create aDataLoaderobject determined byifstatements.https://github.com/microsoft/DeepSpeed/blob/3324efd9306bc19b3cd7a669b339f84983d3ebf8/deepspeed/runtime/dataloader.py#L126-L159
Why not just:
The code would be much more readable.
So as a new learner, I'm just curious. What is the purpose of the seemingly repetitive code? Is it to make sure that the default values of params in
torch.utils.data.DataLoaderwould not be messed up in case they are changed by PyTorch team?Beta Was this translation helpful? Give feedback.
All reactions