cli-workflows
Construct and debug safe TensorFlow Datasets CLI commands for build, new, convert_format, and build_croissant workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- cli-workflows
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Construct and debug safe TensorFlow Datasets CLI commands for build, new, convert_format, and build_croissant workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/build-command-recipes.md7.4 KB
- 参考文档references/cli-reference.md10.1 KB
- 参考文档references/troubleshooting.md6.3 KB
- 脚本scripts/build_command_helper.py11.0 KB
- 脚本scripts/tfds_cli_reference.py6.3 KB
03 SKILL.md 正文
TensorFlow Datasets CLI workflows
Use this sub-skill when the task is to assemble, inspect, or debug tfds command lines for TensorFlow Datasets. It covers the build, new, convert_format, and build_croissant commands, with safe defaults for dry runs, temporary data locations, reduced example counts, and conversion/publishing safeguards.
Operating protocol
- Start with parser inspection. Prefer
tfds --help,tfds --version, andtfds <command> --help, or runscripts/tfds_cli_reference.pyto confirm the installed entry point and expected flags. - Make side effects explicit. Put global
--dry_run=Truebefore the subcommand while designing a command. Use explicit--data_dirfor builds and Croissant output. Use explicit--out_dirfor format conversion unless intentionally mutating an existing prepared dataset directory. - Prototype before full work. For
tfds build, start with--max_examples_per_split=1or0; only remove it after paths, imports, configs, checksums, and optional dependencies are known. - Keep generated artifacts isolated. Use safe temporary or staging directories for
--data_dir,--download_dir,--extract_dir,--manual_dir,--publish_dir, and conversion--out_diruntil the command is proven. - Check option interactions. Do not combine incompatible or ambiguous selectors/flags: e.g.
--download_only=Truewith--register_checksums=True; config in bothdataset/configand--config; multiple--dataset_version_dirvalues with--out_dir. - Escalate out-of-scope details. Authoring builder code belongs to
dataset-authoring; Beam runner semantics and Dataflow/Flink tuning tobeam-and-performance; Croissant data modeling and community catalog details toformats-and-community; loading existing datasets in Python todata-loading.
Command families at a glance
- Top level:
tfds [--version] [--dry_run=True] {build,new,convert_format,build_croissant} ....--dry_runis a top-level flag, so place it before the subcommand. tfds new: creates a dataset skeleton in--dir; it writes files and fails if the target dataset directory already exists. Data format templates arestandard,conll, andconllu.tfds build: prepares datasets from registered names, imported modules, local dataset folders, or local dataset builder scripts. Critical safety flags are--data_dir,--max_examples_per_split,--download_dir,--extract_dir,--manual_dir,--config/--config_idx,--imports,--file_format, shard controls, and publishing/checksum options.tfds convert_format: converts prepared dataset shards totfrecord,riegeli,array_record, orparquet. It can mutate the input dataset directory when--out_diris omitted; use staging copies and explicit output directories for safety.tfds build_croissant: builds TFDS data from Croissant JSON-LD. Provide explicit--jsonld,--data_dir, optional--record_sets, JSON--mapping, and version/publish flags only after validating the metadata and files.
Bundled references and scripts
references/cli-reference.md: distilled CLI layout, selectors, flags, side effects, and option interactions.references/build-command-recipes.md: safe command recipes and staged workflows for build, conversion, Croissant, and skeleton creation.references/troubleshooting.md: error triage for CLI discovery, dataset lookup, configs, paths, checksums, conversions, Croissant mapping, and optional dependencies.scripts/build_command_helper.py: assembles safetfds buildcommands without executing them.scripts/tfds_cli_reference.py: checks the installedtfdsentry point, version, help pages, and key command flags.
Evidence distilled
The operating facts in this sub-skill are distilled from the TFDS CLI documentation notebook, the installed CLI help/version output for TensorFlow Datasets 4.9.10+nightly, and source/test behavior for the command parser, build, new, convert_format, Croissant build, and CLI utilities. The inspection environment proved CPU CLI import/help checks with TensorFlow, Beam, and Croissant dependencies installed; do not assume every downstream user already has those optional packages unless their command path needs them.
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).