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

Expose more arguments to dataloader #2332

Open
anton-emanuel opened this issue Oct 4, 2024 · 0 comments · May be fixed by #2333
Open

Expose more arguments to dataloader #2332

anton-emanuel opened this issue Oct 4, 2024 · 0 comments · May be fixed by #2333
Labels
datamodules PyTorch Lightning datamodules

Comments

@anton-emanuel
Copy link

anton-emanuel commented Oct 4, 2024

Summary

I have noticed differences in data loading speeds by varying persistent_workers, pin_memory, and prefetch_factor. In the dataloader. I saw that persistent_workers has already been enabled when num_workers>1 (#2291). Would it be possible to let more arguments than num_workers be configurable in datamodules?

Rationale

It enables faster data loading in some cases.

Implementation

Let pin_memory and prefetch_factor be configurable like num_workers. See #2333.

Alternatives

Maybe not so nice with many additional arguments to datamodule. Is there any way to get around that?

Additional information

No response

@adamjstewart adamjstewart added the datamodules PyTorch Lightning datamodules label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodules PyTorch Lightning datamodules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants