-
Notifications
You must be signed in to change notification settings - Fork 7.1k
'make_dataset' as staticmethod of 'DatasetFolder' #3215
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
Conversation
Hey @ain-soph and thanks for the PR! I'm not sure I understand the purpose of this change. Could you elaborate this a bit?
|
@pmeier
Yes, exactly! I wanna read data from a zip file (which is not compressed), and it is a file whose contents follow Well, actually this It's just a use case, and I think
I see that the original method of |
IMO that is reasonable. Still, lets hear what @fmassa has to say about this.
GIven that in the future other implementations might use some object attributes or methods, I would simply define it as standard method. |
Any update? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I had in mind for a while already, thanks for doing this!
Summary: * 'make_dataset' as staticmethod of 'DatasetFolder' * a better fix Reviewed By: datumbox Differential Revision: D25954567 fbshipit-source-id: 514fde3bad4e27518a198276228a36c3217c2163 Co-authored-by: Francisco Massa <fvsmassa@gmail.com>
Make
DatasetFolder
more generalized so that subclasses could inheritDatasetFolder
rather thanVisionDataset
.Example: ZippedImageFolder #950
https://github.com/koenvandesande/vision/blob/6247d96d3ce658d553e4e2ceea5cedd77f715b29/torchvision/datasets/zippedfolder.py#L12-L123
If the pull request is approved. I can write it in a more convenient way without re-implement DatasetFolder utilities.
See my implementation at ZipFolder Issue