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

Increase DALI adoption by providing a PyTorch dataset wrapper #2569

Open
FuriouslyCurious opened this issue Dec 20, 2020 · 2 comments
Open
Labels
enhancement New feature or request external contribution welcome A good place to start contributing to the project

Comments

@FuriouslyCurious
Copy link

Hi DALI team,

Thank you for a wonderfully performant library! I think there is a way to dramatically boost DALI adoption with a couple of pull requests.

PyTorch TorchVision provides many dataset loaders here:
https://pytorch.org/docs/stable/torchvision/datasets.html

TorchVision ImageFolder dataset is the closest to DALI interface. Creating "DALI" loader through a pull request will make this library much easier to use for the PyTorch ecosystem.
ImageFolder code begins here:
https://github.com/pytorch/vision/blob/2f1399e86309fa3c286771176c017fdfaf3ce00e/torchvision/datasets/__init__.py

How do you feel about this idea? Thanks for the feedback!

@jantonguirao
Copy link
Contributor

Hi @FuriouslyCurious and thanks for your suggestion. I am not sure I understood it fully so please correct me if I got it wrong.

Do you mean, create a DALI wrapper in the PyTorch project?
That is basically the idea of nvidia.dali.plugin.pytorch.DALIGenericIterator which just replaces your PyTorch data loader completely. The specifics of your data loading and processing go inside the DALI pipeline definition.
https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/frameworks/pytorch/pytorch-basic_example.html

Please provide more information in case you meant something different.

@jantonguirao jantonguirao added the question Further information is requested label Dec 28, 2020
@JanuszL JanuszL added enhancement New feature or request external contribution welcome A good place to start contributing to the project and removed question Further information is requested labels Jan 7, 2021
@JanuszL
Copy link
Contributor

JanuszL commented Jan 7, 2021

If your ask is about making a dedicated set of predefined DALI pipelines inside the PyTorch repository then it sounds like a good idea. However we don't have the resources now to do so, we might do this in the future. However, we would be more than happy to see and review a community originated PR integrating DALI into PyTorch more tightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external contribution welcome A good place to start contributing to the project
Projects
None yet
Development

No branches or pull requests

3 participants