Skip to content

Commit 1fb11fb

Browse files
Update builder docstring for deprecated/added arguments (#4429)
* Add added/deprecated to builder config_name/name * Move builder docstring to constructor * Move builder docstring to class * Add all to builder docs * Remove paragraph from docstring * Fix all * Just leave one arg * Fix arg type * Revert changes * Add deprecated/added to builder name/config_name * Fix deprecated/added * Fix deprecated/added adding more blank lines * Fix style * Fix
1 parent 5de20ee commit 1fb11fb

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/datasets/builder.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ class DatasetBuilder:
199199
It affects the data generated on disk: different configurations will have their own subdirectories and
200200
versions.
201201
If not provided, the default configuration is used (if it exists).
202+
203+
<Added version="2.3.0">
204+
205+
Parameter `name` was renamed to `config_name`.
206+
207+
</Added>
202208
hash (`str`, *optional*): Hash specific to the dataset code. Used to update the caching directory when the
203209
dataset loading script code is updated (to avoid reusing old data).
204210
The typical caching directory (defined in ``self._relative_data_dir``) is: ``name/version/hash/``.
@@ -219,7 +225,14 @@ class DatasetBuilder:
219225
``os.path.join(data_dir, "**")`` as `data_files`.
220226
For builders that require manual download, it must be the path to the local directory containing the
221227
manually downloaded data.
222-
name (`str`): Deprecated. Use `config_name` instead.
228+
name (`str`): Configuration name for the dataset.
229+
230+
<Deprecated version="2.3.0">
231+
232+
Use `config_name` instead.
233+
234+
</Deprecated>
235+
223236
**config_kwargs (additional keyword arguments): Keyword arguments to be passed to the corresponding builder
224237
configuration class, set on the class attribute [`DatasetBuilder.BUILDER_CONFIG_CLASS`]. The builder
225238
configuration class is [`BuilderConfig`] or a subclass of it.

0 commit comments

Comments
 (0)