formats-and-community
Use TensorFlow Datasets format-specific builders, external prepared layouts, community namespaces, HuggingFace wrappers, Croissant metadata, folder datasets, and dataset collections.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- formats-and-community
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use TensorFlow Datasets format-specific builders, external prepared layouts, community namespaces, HuggingFace wrappers, Croissant metadata, folder datasets, and dataset collections.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/community-and-collections.md5.3 KB
- 参考文档references/external-data-layouts.md6.0 KB
- 参考文档references/format-builders.md10.7 KB
- 参考文档references/troubleshooting.md5.9 KB
- 脚本scripts/check_external_tfrecord_layout.py15.3 KB
03 SKILL.md 正文
Formats and Community
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.
Fast operating path
-
Classify the source shape before touching data:
- image tree:
split/label/image.{jpg,jpeg,png}->tfds.ImageFolder - translation files:
language.split.txt->tfds.TranslateFolder - already-prepared TFDS folder ->
tfds.builder_from_directoryortfds.builder_from_directories - external
tf.train.Exampleshards -> validate metadata and shard names, then use read-only loading - in-memory
tf.data.Datasetor keyed iterator ->tfds.dataset_builders.store_as_tfds_dataset/AdhocBuilder - Croissant JSON-LD ->
tfds.dataset_builders.CroissantBuilder - HuggingFace repository or namespace ->
tfds.load('huggingface:...'),tfds.builder('huggingface:...'), orHuggingfaceDatasetBuilder - benchmark/task bundle ->
tfds.dataset_collection(...)
- image tree:
-
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(...)returnstf.data.Datasetand 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 todataset-authoring. If it becomes command syntax fortfds build,tfds new,convert_format, orbuild_croissant, switch tocli-workflows.
Verified API anchors
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(...)
Bundled references
- Format-specific builders:
ImageFolder,TranslateFolder, prepared builder folders, external/in-memory format builders, Croissant, HuggingFace, CoNLL, andas_datasetversusas_data_sourcechoices. - External data layouts: TFDS metadata files, shard filename templates,
write_metadata, split statistics, multi-directory reads, and validator workflow. - Community catalogs and collections:
community-datasets.toml, namespaces, HuggingFace routing, community path types, and dataset collection loader workflows. - Troubleshooting: common failure modes for metadata, folder layouts, community namespaces, HuggingFace, Croissant, CoNLL, and data-source boundaries.
Bundled script
- External TFRecord layout checker: validates metadata file presence, JSON readability, default or custom shard naming templates, split membership, contiguous shard indices, declared shard counts, and selected metadata consistency without importing TensorFlow Datasets or the source checkout.
Safety defaults
- Treat HuggingFace, community package paths, Croissant URLs, public GCS paths, and
download_and_prepare()as network/cache/credential-sensitive. - Keep manual Croissant mappings explicit and keyed by the exact file-object names from the JSON-LD metadata.
- Do not call
download_and_prepare()onImageFolder,TranslateFolder, or read-only builders as if they were standard generation builders. - Do not claim TensorFlow-less consumption from
as_dataset; use the data-source path only when the stored file format supports random access. - Keep runtime advice self-contained; do not depend on original repository docs, tests, scripts, or local checkout paths.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).