Switch `FileLoader` to `FileOpener`
See original GitHub issueShould we change the name of FileLoader
to FileOpener
?
We split the file-loading functionality into three steps:
- List file names in a directory:
FileLister
- Open file handles:
FileLoader
(I personally feel like the name is incorrect.) - Read files:
dp.map(fn=lambda x: x.read(), input_col=1)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
glide/FileLoader.java at master · bumptech/glide - GitHub
An image loading and caching library for Android focused on smooth scrolling - glide/FileLoader.java at master · bumptech/glide.
Read more >26 File Chooser - Using JavaFX UI Controls
This chapter explains how to use the FileChooser class to enable users to navigate the file system. The samples provided in this chapter...
Read more >File Opener - Plugin for Cordova | Ionic Documentation
File opener2 plugin for Cordova opens files on your device file system with its default application. Learn more about installation and usage.
Read more >Tkinter Open File Dialog - Python Tutorial
Summary: in this tutorial, you'll learn how to show an open file dialog in Tkinter applications. Introduction to the Tkinter Open File Dialog...
Read more >RequestListener (glide API)
A class for monitoring the status of a request while images load. All methods in this interface will be called from a background...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
From a purely naming perspective, I think
FileOpener
is more accurate butFileLoader
isn’t wildly misleading either.I had a look at
numpy.load
,json.load
,pickle.load
, these seem to either read or parse through files that have already been opened and return some structured data. In that sense,FileLoader
definitely behaves differently relative to other modules. Renaming it is likely better.Perhaps we can rename it, but still leave
FileLoader
functional with a deprecation warning? I would imagine most people who started usingIterDataPipe
in PyTorch Core would be usingFileLoader
and it would be a BC-breaking change.I agree that based on the prototyping policy we should be able to rename as we wish. I think the policy is very clear for things that exist in TorchData. Do you think that policy is clear to users for things that are in PyTorch Core? If so, then we can rename it without deprecation.