You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/loading_datasets.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,11 +175,11 @@ Generic loading scripts are provided for:
175
175
176
176
If you want to control better how your files are loaded, or if you have a file format exactly reproducing the file format for one of the datasets provided on the `HuggingFace Hub <https://huggingface.co/datasets>`__, it can be more flexible and simpler to create **your own loading script**, from scratch or by adapting one of the provided loading scripts. In this case, please go check the :doc:`add_dataset` chapter.
177
177
178
-
The :obj:`data_files` argument in :func:`datasets.load_dataset` is used to provide paths to one or several files. This argument currently accepts three types of inputs:
178
+
The :obj:`data_files` argument in :func:`datasets.load_dataset` is used to provide paths to one or several data source files. This argument currently accepts three types of inputs:
179
179
180
-
- :obj:`str`: a single string as the path to a single file (considered to constitute the `train` split by default)
181
-
- :obj:`List[str]`: a list of strings as paths to a list of files (also considered to constitute the `train` split by default)
182
-
- :obj:`Dict[Union[str, List[str]]]`: a dictionary mapping splits names to a single file or a list of files.
180
+
- :obj:`str`: A single string as the path to a single file (considered to constitute the `train` split by default).
181
+
- :obj:`Sequence[str]`: A list of strings as paths to a list of files (also considered to constitute the `train` split by default).
182
+
- :obj:`Mapping[str, Union[str, Sequence[str]]`: A dictionary mapping splits names to a single file path or a list of file paths.
183
183
184
184
Let's see an example of all the various ways you can provide files to :func:`datasets.load_dataset`:
185
185
@@ -490,9 +490,9 @@ For example, run the following to get the path to the cache directory of the IMD
0 commit comments