dataset-authoring
Author, test, and debug custom TensorFlow Datasets builders and dataset collections.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- dataset-authoring
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Author, test, and debug custom TensorFlow Datasets builders and dataset collections.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/builder-authoring.md11.4 KB
- 参考文档references/dataset-collections.md6.2 KB
- 参考文档references/feature-connectors.md8.7 KB
- 参考文档references/testing-and-validation.md9.5 KB
- 参考文档references/troubleshooting.md9.4 KB
- 脚本scripts/dataset_skeleton_check.py24.6 KB
03 SKILL.md 正文
TensorFlow Datasets Dataset Authoring
Use this sub-skill when the task is to create, revise, test, or debug a custom TensorFlow Datasets (TFDS) dataset builder or dataset collection. It is focused on repository-local or package-local authoring workflows, not on loading an already prepared dataset.
Use this for
- Creating or reviewing a
tfds new-style dataset folder. - Implementing
tfds.core.GeneratorBasedBuilderwith_info,_split_generators, and_generate_examples. - Choosing
DatasetInfo,BuilderConfig,Version,SplitGeneratorreplacement patterns,DownloadManager, and feature connectors. - Creating safe dummy data and
tfds.testing.DatasetBuilderTestCasetests. - Handling checksums, manual downloads, version/release-note changes, and common implementation gotchas.
- Authoring dataset collections with collection metadata, versioned references, and collection tests.
Route elsewhere
- CLI command syntax,
tfds build,tfds newoptions, and command construction: route tocli-workflows. - Beam/Dataflow/Flink generation, distributed transforms, or performance scaling: route to
beam-and-performance. - External TFRecord layouts, folder datasets, Croissant, HuggingFace/community wrappers, and format-specific builders: route to
formats-and-community. - Loading, inspecting, decoding, splitting, or iterating existing datasets without authoring code: route to
data-loading.
Start-here workflow
- Identify whether the user is authoring a dataset builder or a dataset collection.
- For a builder, inspect the candidate folder with the bundled validator:
- Use the references in this order:
- Keep the authoring folder self-contained: implementation, metadata files, checksum file, test, and dummy data should live together.
- Prefer small dummy-data tests and metadata/API checks before any full generation or network-dependent workflow.
Installed API facts to rely on
The inspected package version exposes these authoring signatures:
tfds.core.GeneratorBasedBuilder(*, file_format=None, **kwargs)tfds.core.BuilderConfig(name, version=None, release_notes=None, supported_versions=<factory>, description=None, tags=<factory>)tfds.core.Version(version, experiments=None, tfds_version_to_prepare=None)tfds.core.SplitGenerator(name, gen_kwargs=None); this is legacy for new builders, which should return a{split_name: generator}dictionary from_split_generators.tfds.core.DatasetInfo(*, builder, description=None, features=None, supervised_keys=None, disable_shuffling=False, nondeterministic_order=False, homepage=None, citation=None, metadata=None, license=None, redistribution_info=None, split_dict=None, alternative_file_formats=None, is_blocked=None)
Quick checks before handing off code
_generate_examplesyields unique, deterministic, comparable keys and feature dictionaries matching_info().features.- Splits match the source data's official splits. If no official split exists, author one split and let users sub-split later.
ClassLabelhas human-readablenamesornames_fileunless there is a specific reason not to.- Image/video/audio shapes and dtypes are explicit when known.
- Dummy data is non-copyrighted, small, structurally faithful, and split-disjoint unless overlap is intentional and declared in the test.
- Download URLs have registered checksums or the test explicitly explains why checksum validation is skipped.
- Dataset collection versions and referenced dataset versions are explicit and covered by a collection test.
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).