View source on GitHub |
Add metadata required to load with TFDS.
tfds.folder_dataset.write_metadata(
*,
data_dir: tfds.typing.PathLike
,
features: features_lib.feature.FeatureConnectorArg,
split_infos: Union[None, epath.PathLike, List[split_lib.SplitInfo]] = None,
version: Union[None, str, tfds.core.Version
] = None,
filename_template: Union[None, str, tfds.core.ShardedFileTemplate
] = None,
check_data: bool = True,
**ds_info_kwargs
) -> None
See documentation for usage: https://www.tensorflow.org/datasets/external_tfrecord
Args | |
---|---|
data_dir
|
Dataset path on which to save the metadata |
features
|
dict of tfds.features.FeatureConnector matching the proto specs.
|
split_infos
|
Can be either: * A path to the pre-computed split info values
( the out_dir kwarg of tfds.folder_dataset.compute_split_info ) * A
list of tfds.core.SplitInfo (returned value of
tfds.folder_dataset.compute_split_info ) * None to auto-compute the
split info.
|
version
|
Optional dataset version (auto-infer by default, or fallback to 1.0.0) |
filename_template
|
the template for the filenames of the data. If None, then
the default template '{DATASET}-{SPLIT}.{FILEFORMAT}-{SHARD_X_OF_Y}' is
used. A string or a ShardedFileTemplate can be given for custom templates.
|
check_data
|
If True, perform additional check to validate the data in data_dir is valid |
**ds_info_kwargs
|
Additional metadata forwarded to tfds.core.DatasetInfo (
description, homepage,...). Will appear in the doc.
|