技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
formats-and-community【数据与研究】Use TensorFlow Datasets format-specific builders, external prepared layouts, community namespaces, HuggingFace wrappers, Croissant metadata, folder datasets, and dataset collections.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a TensorFlow Datasets (TFDS) task starts from an existing data format, prepared shard directory, folder layout, community namespace, HuggingFace repository, Croissant JSON-LD description, or dataset collection rather than from a handwritten generic builder.
Do not use this sub-skill for core GeneratorBasedBuilder authoring, detailed CLI flag construction, Beam/Dataflow/Flink scaling, or ordinary public dataset loading. Route those tasks to dataset-authoring, cli-workflows, beam-and-performance, and data-loading respectively.
Classify the source shape before touching data:
split/label/image.{jpg,jpeg,png} -> tfds.ImageFolderlanguage.split.txt -> tfds.TranslateFoldertfds.builder_from_directory or tfds.builder_from_directoriestf.train.Example shards -> validate metadata and shard names, then use read-only loadingtf.data.Dataset or keyed iterator -> tfds.dataset_builders.store_as_tfds_dataset / AdhocBuildertfds.dataset_builders.CroissantBuildertfds.load('huggingface:...'), tfds.builder('huggingface:...'), or HuggingfaceDatasetBuildertfds.dataset_collection(...)Prefer metadata-first checks. Do not trigger large downloads, full builds, cloud runners, or authenticated catalog access unless the user explicitly accepts the cost and credentials boundary.
For external shard folders, run the bundled standalone checker first:
python scripts/check_external_tfrecord_layout.py builder_dir --dataset-name my_dataset --file-format tfrecord --split train --split test
Choose the read surface deliberately:
builder.as_dataset(...) / tfds.load(...) returns tf.data.Dataset and needs the TensorFlow path.builder.as_data_source(...) / tfds.data_source(...) is for Python/random-access consumption and only works for supported random-access formats such as ArrayRecord or Parquet.builder_from_directory(...) produces a read-only builder for prepared data; it is not a regeneration path.If the work becomes defining _info, _split_generators, feature connectors, dummy-data tests, or release/version policy for a custom builder, switch to dataset-authoring. If it becomes command syntax for tfds build, tfds new, convert_format, or build_croissant, switch to cli-workflows.
The inspection environment verified TFDS 4.9.10+nightly public signatures for this sub-skill, including:
tfds.builder_from_directory(builder_dir, file_format=None)tfds.builder_from_directories(builder_dirs, filetype_suffix=None)tfds.ImageFolder(root_dir, shape=None, dtype=None)tfds.TranslateFolder(root_dir)tfds.dataset_builders.AdhocBuilder(...)tfds.dataset_builders.TfDataBuilder(...) as a legacy compatibility wrappertfds.dataset_builders.CroissantBuilder(...)tfds.dataset_builders.HuggingfaceDatasetBuilder(...)ImageFolder, TranslateFolder, prepared builder folders, external/in-memory format builders, Croissant, HuggingFace, CoNLL, and as_dataset versus as_data_source choices.write_metadata, split statistics, multi-directory reads, and validator workflow.community-datasets.toml, namespaces, HuggingFace routing, community path types, and dataset collection loader workflows.download_and_prepare() as network/cache/credential-sensitive.download_and_prepare() on ImageFolder, TranslateFolder, or read-only builders as if they were standard generation builders.as_dataset; use the data-source path only when the stored file format supports random access.