tfds.core.add_data_dir
Stay organized with collections
Save and categorize content based on your preferences.
Registers a new default data_dir
to search for datasets.
tfds.core.add_data_dir(
data_dir
)
When a tfds.core.DatasetBuilder
is created with data_dir=None
, TFDS
will look in all registered data_dir
(including the default one) to
load existing datasets.
- An error is raised if a dataset can be loaded from more than 1 registered
data_dir.
- This only affects reading datasets. Generation always uses the
data_dir
kwargs when specified or tfds.core.constant.DATA_DIR
otherwise.
Args |
data_dir
|
New data_dir to register.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfds.core.add_data_dir\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/file_utils.py#L66-L84) |\n\nRegisters a new default `data_dir` to search for datasets. \n\n tfds.core.add_data_dir(\n data_dir\n )\n\nWhen a [`tfds.core.DatasetBuilder`](../../tfds/core/DatasetBuilder) is created with `data_dir=None`, TFDS\nwill look in all registered `data_dir` (including the default one) to\nload existing datasets.\n\n- An error is raised if a dataset can be loaded from more than 1 registered data_dir.\n- This only affects reading datasets. Generation always uses the `data_dir` kwargs when specified or `tfds.core.constant.DATA_DIR` otherwise.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------|---------------------------|\n| `data_dir` | New data_dir to register. |\n\n\u003cbr /\u003e"]]