Help with ModuleNotFoundError: No module named 'Dataloader' !pip not working

LisaP: <p>I am very new to Python and need some help. I keep getting the error message, “ModuleNotFoundError: No module named ‘Dataloader’.” I have tried manually installing dependencies using !pip, but that is not correcting the error either. I have included a screenshot of the error message below.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/e/e/ee24ea1bfa10380d99c0face2abd7405ccf22fac.png" data-download-href="https://discuss.pytorch.org/uploads/default/ee24ea1bfa10380d99c0face2abd7405ccf22fac" title="Screenshot 2024-01-04 at 5.07.40 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/e/e/ee24ea1bfa10380d99c0face2abd7405ccf22fac_2_690x323.png" alt="Screenshot 2024-01-04 at 5.07.40 PM" data-base62-sha1="xYIJ4bAgcHwzLsuDGpCdAW4veEY" width="690" height="323" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/e/e/ee24ea1bfa10380d99c0face2abd7405ccf22fac_2_690x323.png, https://discuss.pytorch.org/uploads/default/optimized/3X/e/e/ee24ea1bfa10380d99c0face2abd7405ccf22fac_2_1035x484.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/e/e/ee24ea1bfa10380d99c0face2abd7405ccf22fac_2_1380x646.png 2x" data-dominant-color="F3F3F2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2024-01-04 at 5.07.40 PM</span><span class="informations">1420×666 73.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I would greatly appreciate any support with correcting this error message I keep getting. Thank you in advance!</p>

ptrblck: <p><code>DataLoader</code> it not a top-level module in PyTorch and you can import it via <code>from torch.utils.data import DataLoader</code>.<br>
The <code>MultiEpochsDataLoader</code> seems to be defined in here: <a href="https://github.com/huggingface/pytorch-image-models/blob/b5a4fa9c3be6ac732807db7e87d176f5e4fc06f1/timm/data/loader.py#L314">https://github.com/huggingface/pytorch-image-models/blob/b5a4fa9c3be6ac732807db7e87d176f5e4fc06f1/timm/data/loader.py#L314</a> so you might want to fix your imports.</p>

LisaP: <p><a class="mention" href="/u/ptrblck">@ptrblck</a> Thank you for your quick reply! I appreciate your help!</p>
<p>This is my imports section and I believe I have the DataLoader aspect put in correctly.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/e/9/e90a60d92024b5a3c31d5acada12916cd4ea3ef0.png" data-download-href="https://discuss.pytorch.org/uploads/default/e90a60d92024b5a3c31d5acada12916cd4ea3ef0" title="Screenshot 2024-01-04 at 5.29.32 PM"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/e/9/e90a60d92024b5a3c31d5acada12916cd4ea3ef0_2_461x500.png" alt="Screenshot 2024-01-04 at 5.29.32 PM" data-base62-sha1="xfzu8mObVEVV0yY0xWMbzfDV8nS" width="461" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/e/9/e90a60d92024b5a3c31d5acada12916cd4ea3ef0_2_461x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/e/9/e90a60d92024b5a3c31d5acada12916cd4ea3ef0_2_691x750.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/e/9/e90a60d92024b5a3c31d5acada12916cd4ea3ef0.png 2x" data-dominant-color="D7DBE8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2024-01-04 at 5.29.32 PM</span><span class="informations">788×854 92.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I will look into the MultiEpochsDataLoader part to see if that gets me closer to my end goal.</p>
<p>Thanks again!</p>